[英]How can I deploy a Gradle build to a maven repository (Nexus) with Jenkins?
I have a third party project that I'm having Jenkins watch. 我有一个正在观看Jenkins的第三方项目。 It is on Github, and Jenkins polls every hour to see if there are any changes in it, then Jenkins builds it using Gradle.
它在Github上,Jenkins每小时轮询一次,看是否有任何变化,然后Jenkins使用Gradle进行构建。
I want Jenkins to then deploy the artifacts that come from the Gradle build to Maven. 我希望Jenkins然后将Gradle构建中的工件部署到Maven。 How can I do that?
我怎样才能做到这一点?
Thanks in advance. 提前致谢。
[PS My apologies if this is the wrong website.] [PS我很抱歉,如果这是错误的网站。]
(As a note: Since I do not own this project, it is a third-party, I can't add a deployment section to the gradle build file so that is out of the question. This is the reason why I am posting here.) (请注意:由于我不是这个项目的所有者,因此它是第三方的,因此无法在gradle构建文件中添加部署部分,因此这是不可能的。这就是我在此处发布的原因。)
You could always inject configuration into the build using an init script . 您总是可以使用init脚本将配置注入到构建中。 Since you have your own CI build just use the Gradle CLI
--init-script
option to point to a script which adds the Maven publishing configuration. 由于您拥有自己的CI构建,因此只需使用Gradle CLI
--init-script
选项即可指向添加Maven发布配置的脚本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.