Copy artifacts from specific promoted build

て烟熏妆下的殇ゞ 提交于 2019-12-23 04:08:24

问题


I have two jobs in Jenkins. First of the name “Build” and the second of the name “Deploy to test environment”. In the first job, tester sets promotion manually, and then only promoted builds can be deployed. In second job I added “Promoted Build Parameter” which generates combobox with promoted builds but I can’t connect the value of this parameter with “Copy artifact from another project” build step. So how can I copy artifacts from the selected promoted build?


回答1:


In your deploy project:

  1. Configure a Promoted Build Parameter named (for example) PromotedBuild
  2. Configure Copy artifacts from another project to Specific build with Build number as ${PromotedBuild_NUMBER}

Also, if you want to trigger the deploy project from your build project, you can do this:

  1. In your promotion process of your build project add Trigger parameterized build on other projects with a Predefined parameter of PromotedBuild_NUMBER=$PROMOTED_NUMBER.


来源:https://stackoverflow.com/questions/21189990/copy-artifacts-from-specific-promoted-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!