Choose which configurations to build in Jenkins multi-configuration job

We're using Jenkins to build an ASP.Net web application and deploying successful builds to stage/test server. The application has multiple configurations (different connnectionstrings, themes, etc) to adapt to different customers.

So, using a multi-configuration job was the natural way to go. This works great for building and deploying all configurations in one go. But what if you only want to build one or a couple of the configurations?

Typical scenario when this would be nice:

  1. The developer completes a milestone/version, test phase starts and 10 configurations are built and deployed on the stage server
  2. Test team identifies a bug in configuration X (i.e. customer X)
  3. The developers fixes the bug (or so they believe) and want the code re-tested
  4. Run the Jenkins job again to get the code on to the stage server

This scenario builds ~9 configurations for nothing. And while these 9 configurations are deployed, anyone who is logged in on one of these test web sites are of course loosing their sessions.

We would like have some parameter that let's us select which configurations to build.

Upvotes: 1

Views: 1639

Answers (1)

Christopher Orr
Christopher Orr

Reputation: 111555

A couple of potential solutions:

The Matrix Reloaded Plugin which should let you rebuild only certain configurations.

Alternatively, when you configure the job, you can enable the "Combination Filter" feature, which tells Jenkins which combinations of the matrix axes to build. However this isn't very dynamic — i.e. you can't change this each time you build. Though maybe it's possible to parameterise this field (I haven't tried this).

Upvotes: 1

Related Questions