I would like to build only some combinations of a matrix job from a pipeline job using the groovy API build.
There is a class called MatrixCombinationsParameterValue in this API but the axis are not taken into account.
For instance if I use this code
The job which name is contained inside the variable jobname is correctly built but without any combination (so basically nothing is done except starting and exiting the job)...
(MatrixConfig is the name of the MatrixCombinationsParameter in the job $jobname)
Moreover, when I look into the environment variables of this build of the matrix job the value of MatrixConfig is empty.
Is the trigger from a pipeline job not supported or am I doing something wrong?
This is quite blocking as we cannot use other jobs than pipeline jobs.
EDIT: I found a "workaround" with this code:
Isn't the first solution supposed to work also?