简体   繁体   English

如何使用Jenkins将Gradle构建部署到Maven存储库(Nexus)?

[英]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.

相关问题 除非我正在执行发布版本,否则如何配置Jenkins不要部署到Maven存储库? - How can I configure Jenkins not to deploy to Maven repository unless I am performing a release build? 在Jenkins管道和Gradle项目中,如何使用Jenkins Nexus插件获取GAV属性以部署工件? - Jenkins pipeline and Gradle project, how can I get the GAV properties to deploy the artifact with Jenkins Nexus Plugin? Jenkins使用部署到Maven存储库将工件部署到Nexus - Jenkins Deploy Artifacts to Nexus using Deploy to Maven Repository 詹金斯:如何用不依赖关系完成Gradle构建? - Jenkins: How to complete a Gradle build with dependencies not in nexus? 将 nexus 凭据绑定到 jenkins 构建中的 maven 部署作业 - Binding nexus credentials to maven deploy job in jenkins build 我可以使用要部署到 Nexus 的 Gradle maven 插件创建仅 Maven POM (BOM) 构建吗? - Can I create a Maven POM-only (BOM) build using the Gradle maven plugin to be deployed to Nexus? 如何使用Gradle将依赖项工件上传到Maven存储库(NEXUS)? - How to upload a dependency Artifact to Maven Repository(NEXUS) using Gradle? 如何通过Maven将zip文件部署到Nexus存储库 - How to deploy zip file to Nexus repository via Maven 如何使用Maven构建Gradle插件 - How can I build a Gradle plugin with Maven Jenkins的“后期构建操作”将zip部署到Maven存储库中 - Jenkins “Post Build Action” to deploy zip on Maven repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM