Question

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?

Was it helpful?

Solution

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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top