As you have the deploying part already configured in the promotion, All that you need to do is retrieve the artefacts from the build that you need, in to the current workspace, This is done with the Copy Artifact Plugin[1] before your deploy
You should set the project to $PROMOTED_JOB_NAME, and "Which build" to "Specific build" with $PROMOTED_NUMBER being the build number. These are added by the promote plugin so that you can see the job and build that is being promoted. See the wiki on this [2] Make sure you artifact the needed file in the main job, and when you promote build #20 it will copy those artifacts into the workspace and deploy those rather than the latest in the workspace. [1] https://wiki.jenkins-ci.org/display/JENKINS/Copy+Artifact+Plugin [2] https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin Chris. On Friday, August 3, 2012 3:32:02 PM UTC+1, qazwart wrote: > > We are using Maven (actually Ant and Ivy, but I'm converting the > ivy.xml to a Maven pom.xm). I store the pom.xml and the jar/war/ear > I'm deploying as a "Build Artifact". I have figured out how to use the > Promotion Plugin to deploy the artifact into our Maven repository when > I press the button to promote the build. > > Let's say I did build #20, and that went to QA. QA is happy with the > build and officially approves it. We want to go ahead and use the > Promotion plugin to deploy the artifacts from Build #20 to our Maven > repository. Unfortunately, we now are on Build #27, so the artifacts > we want to deploy are no longer in the working directory. > > Is there a way to promote the artifacts from Build #20 even though it > is not the latest build? > > -- > David Weintraub > [email protected] >
