0
votes
  1. I want to create a Jenkins multi-configuration project, where each iteration runs against a different operating system (i.e. the axis consists of Jenkins slave labels).
  2. For each platform, I want Jenkins to run a different Maven profile. For example, for label "linux-slave" I want it to run Maven profile "linux-amd64-gcc-debug".
  3. The Maven profile names differ from the Jenkins slave labels. As such, I'd like to configure a mapping on the Jenkins end that will map each label to a different profile name.
  4. Finally, sometimes want a single label to run multiple Maven profiles. For example, "linux-slave" should build the following Maven profiles:

    • linux-i386-gcc-debug
    • linux-i386-gcc-release
    • linux-amd64-gcc-debug
    • linux-amd64-gcc-release

Is it possible to implement this in terms of a Jenkins multi-configuration project? If so, how?

2

2 Answers

0
votes

You can try the Matrix Groovy Execution Strategy

You can have one axis as the axis labels you want and the other would probably be a user defined axis of all the possible profiles you want.

In the strategy script you can just select the combinations you want. So it behaves like a more poweful combination filter.

I think you would need parameters at runtime to decide which profiles you wanted an to choose debug options. These parameters can be used in the script to decide the combinations you want

Disclaimer: I built the matrix execution strategy

0
votes

The following ended up working for me:

screenshot

You can then run mvn install -P${profile} from a shell build step.