matrix combinations filter in combination with parametrized trigger plugin

I have a Project in which I use Matrix Combinations plugin to run different combinations of parameters. For simplicity sake let’s just say I have to parameters par_1 and par_2. In the configuration of the job I use the parametrized trigger plugin to set the BUILD_CAUSE_UPSTREAM to the matrix and then in the projects to build section I set the the name to “Test” which means that matrix will be executed before the job “Test”.

The problem that I have now is that after running this configuration with these two parameters for the matrix combinations two separate builds get created for the job “Test”. For example Build_1 got created for par_1 and the artifacts also got stored in Build_1 and for par_2 Build_2 got created and artifact for par_2 got stored in Build_2.

I want to change the configuration so that if I select two parameters for example only one build gets created for these two parameters and also the two artifact get’s stored in one build.

My approach would be to pass an artifact from one job to another but that doesn’t seem to be a clean approach. For example if I have 5 parameters it will create 5 builds and pass each artifact to the other builds.

Is there a better approach ? Thanks in advance.

it sounds like your not using pipelines (by mentioning Matrix Combinations plugin). I think that’s purely how matrix plugin works.

If you using parallel or serial instead of matrix in pipelines (which I highly recommend) then it can be done in one job, but i think matrix + non pipeline it’ll be a limitation.

I am using a freestyle job.
So there is no way for me to create one job for many matrix combinations ?
Or should I just pass the artifacts from one job to another ?