简体   繁体   English

包含计划文件的Jenkins Maven构建推送到工件

[英]Jenkins Maven build with plan files push to artifactory

I have a Jenkins build which has 2 requirements. 我有一个有2个要求的Jenkins版本。

  1. maven build(.war) that pushes war to snapshot or release on artifactory Maven build(.war)将战争推送到快照或在工件上发布
  2. Also push plan(.xml) files to 'plan' repository on artifactory - This needs to have the pom version (from pom.xml) in the path. 还将plan(.xml)文件推送到工件上的“ plan”存储库-这需要在路径中具有pom版本(来自pom.xml)。

    人工制品-XML

I am having trouble replacing the $POM-VERSION in the path with the pom version. 我无法用pom版本替换路径中的$ POM-VERSION。 What I have tried so far 到目前为止我尝试过的

Solution 1 解决方案1

Jenkins Maven Build - I don't seem to get an option to upload the plan files to artifactory with this. Jenkins Maven Build-我似乎没有办法将计划文件上传到工件。

Solution 2 解决方案2

Jenkins Freestyle Project - I can execute the maven build and upload the plans but pom-version is not available in freestyle Jenkins Freestyle项目-我可以执行Maven构建并上传计划,但pom-version在Freestyle中不可用

Solution 3 解决方案3

Jenkins Maven Build passing the pom version as a parameter to a freestyle build. Jenkins Maven构建将pom版本作为参数传递给自由式构建。 This all ties together but the artifactory plugin does not replace the parameter in the path (As you can see above) - It seems it will work for environment variables but not parameters. 所有这些都联系在一起,但是人工插件不会替换路径中的参数(如您在上面看到的)-看来它将对环境变量有效,但对参数无效。 部署细节

Any ideas are welcome on how to workaround this or if anybody has any other suggested approaches. 欢迎就如何解决此问题或任何其他建议的方法提出任何想法。 Or maybe I am missing something simple with this? 或者,也许我错过了一些简单的事情?

env注入插件似乎已经解决了解决方案3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM