Historically, we have used Jenkins to build and package about 35 projects, all on Debian Lenny 32 bit. We are now in the process of migrating to Ubuntu Precise 64 bit systems, and we have a need to build some of our projects on both of these architectures during the transition phase. A perfect use case for matrix jobs, right? Seems like it, but I've run hard into a limitation of this type of build, and no combination of plugins or other hacks has given me a solution.
Our build jobs compile and run tests, and if those pass, they run a rake task to increment the version number (using our internal format) and then generate a package. The version number is timestamp based, so when we run a matrix build on two different nodes, we end up with two slightly different version numbers for e.g. the 32 and 64 bit packages. This in turn causes problems for our deploy system, which wants to ingest one version number, and then grab the appropriate package for the appropriate hosts. What I need is a way to increment the version number in one place, and then distribute that to all the nodes that run the build steps of the matrix job. I can even handle generating the version number independently of an SCM checkout of our code - a shell script option would be fine. Or if I could trigger an external job ONCE (not for every slave that the matrix runs on), which would generate a version number and offer it as an artifact for my build to ingest, that would work too. What I don't want to do is create a top level job that has to be run to generate a number, then pass that on to whichever of the 35 downstream jobs actually need it. I've looked at the Env Inject plugin, I've looked at touchstone builds, and a few other things. Nothing seems to do what I want, and it's really blocking progress on this migration for us. If anyone has suggestions for what I could try, I'm all ears! Thanks :)