We’ve got one parameterized job to perform database integration tests. The parameter is basically the brand of database to be tested (ie. mysql, derby, oracle, etc…). We want to make sure that exactly the same tests succeed on all supported databases.
Our problem is that Jenkins does not consider the execution’s parameters. The execution results are not grouped per parameter value. And because of that, if the last execution was successful, the job is considered successful. Even though previous jobs might have failed.
I’m looking for a way to keep a single job definition no matter what. If the definitions are duplicates, the danger exists that sooner or later they diverge. And tests would become database brand-specific.
What I’ve tried so far:
- Making a dummy job for each parameter value and trigger the parameterized job from there. But the results of the triggered job are not included into the dummy job.
- The Template plugin is right out because it considers parameterized jobs as “not buildable”.
The easy solution is of course copying the jobs. But I’d like to avoid that really.
Does anybody has a practical solution for this ?
Found it ! It’s actually part of Jenkins. It’s a “multi-configuration project”. Of job of this kind defines one or more dimensions (axes) each with their distinct values. A separate job is run for each distinct value.
An environment variable is made with the name of the axis. The value of that variable is different for each build.
In Jenkins the builds are grouped per value of the axis.
Et Voila ! A single job configuration for different executions.
And it seems more than one axis can be defined. So I think there’ll be a build for each distinct combination of all the axes !!