1
votes

I've configured a Jenkins matrix job that has a total of 4 axis points. For each axis there is a single build step (parameterized-trigger) triggering another project adding the current build parameters. All four jobs are triggering the same job with different parameters.

The problem I am seeing is only one drown stream job gets executed, I would expect 4.

This is NOT a post-build task, it is setup as a build step. This is the description in the Parameterized Trigger Plugin wiki page:

Build step

When using the trigger parameterized build as a buildstep it will be called for every different configuration, so if triggering another project with no parameters it will be done the same number of times as you have configurations, possible causing the triggered job to run more than once.

However this also allows you to trigger other jobs with parameters relating to the current configuration, i.e. triggering a build on the same node with the same JDK.

This is the log entry for the downstream job, it shows all for triggers, but they all seem to be launching the same exact job:

Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x/ProductType=video,SecurityType=standard" build number 12
originally caused by:
 Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x" build number 12
 originally caused by:
  Started by user anonymous
Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x/ProductType=video,SecurityType=secure" build number 12
originally caused by:
 Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x" build number 12
 originally caused by:
  Started by user anonymous
Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x/ProductType=voice,SecurityType=standard" build number 12
originally caused by:
 Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x" build number 12
 originally caused by:
  Started by user anonymous
Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x/ProductType=voice,SecurityType=secure" build number 12
originally caused by:
 Started by upstream project "AndroidLibraries_Mx_Branch_5_1_x" build number 12
 originally caused by:
  Started by user anonymous
[Pipeline] node
Running on master in /var/lib/jenkins/workspace/AndroidLibrary_pipeline

<... job details ... >

If it makes any difference, the downstream job is a pipeline job as noted by the name.

  • Jenkins 2.19.2
  • Matrix Plugin 1.7.1
  • Parameterized Trigger Plugin 2.32
  • Pipeline 2.4

I've done a good bit of searching, and while I found a similar issue, the accepted answer does not help.

1

1 Answers

1
votes

I figured it out. The parameters were not being passed correctly to the child job. I had the "Current build parameters" option set in the trigger parameterized job set, but I had to add "Predefined parameters" also, adding the parameters that the child job was expecting.

SecurityType=${SecurityType}
ProductType=${ProuductType}