Search code examples
jenkinsjenkins-plugins

Parameter List in Jenkins to display list of build numbers from another build


I have two Jenkins builds, one for compiling and one for deploying.

The developer wants to be able to choose a build from the compiler build when running the deploy build, not always run the most recent build.

What I am after is a method of populating a choice parameter for the deploy build with a list of successful\unstable builds from the compile build.

I will then use the the option listed in the parameter to deploy that artifact.


Solution

  • One option is to use the Promoted Builds plugin to mark a specific build to be deployed. This moves the choice from the deployment build into the compilation build. Select the Promote builds when... option in the compilation build and set up how you want promotion to work. The developer could choose (or automate) the build to promote. In the deployment build, the Copy Artifact plugin can grab the appropriate build (based on a permalink to the latest promoted build).