Jenkins Paramerized Trigger + Copy Artifact

Posted by Josh Kelley on Programmers See other posts from Programmers or by Josh Kelley
Published on 2012-12-03T13:38:11Z Indexed on 2012/12/03 17:18 UTC
Read the original article Hit count: 291

Filed under:
|

I'm working on setting up Jenkins to handle our release builds. A release build consists of a Windows installer that includes some binaries that must be built on Linux.

Here's what I have so far:

  • The Windows portion and Linux portion are set up as separate Jenkins projects.
  • The Windows project is parameterized, taking the Subversion tag to build and release.
  • As part of its build, the Windows project triggers a build of that same Subversion tag for the Linux project (using the Parameterized Trigger plugin) then copies the artifacts from the Linux project (using the Copy Artifact plugin) to the Windows project's workspace so that they can be included in the Windows installer.

Where I'm stuck: Right now, Copy Artifact is set up to copy the last successful build. It seems more robust to configure Copy Artifact to copy from the exact build that Parameterized Trigger triggered, but I'm having trouble figuring out how to make that work. There's an option for a "build selector" parameter that I think is intended to help with this, but I can't figure out how it's supposed to be set up (and blindly experimenting with different possibilities is somewhat painful when the build takes an hour or two to find success or failure).

How should I set this up? How does build selector work?

© Programmers or respective owner

Related posts about release

Related posts about jenkins