1
votes

I use Parameterized Build plugin to trigger a train of 4 jobs. Job 1 is set to "Trigger Parameterized Build on Other Project". It calls job B and sets one parameter from a property file and one is set as predefined.

Job B has the two input parameters defined as String parameters, and the job finds both parameters and it runs fine. Job B is set to "Trigger Parameterized Build on Other Project", and it calls job C. Job C is parameterized to receive the same two parameters.

However, Job C never gets any parameters. In Job B I've tried passing the Current Build Parameters, I've tried setting Predefined Parameters (of type var1=${var1}, and even setting myTestVar=hello), but no parameters are ever found in Job C.

Job A is a maven build, Job B is freestyle, C is Maven again, and D is freestyle (if I ever get there).

I'm using Jenkins 1.623 and Parameterized Build Plugin 2.27.

I'm at a loss here. Any ideas?

1

1 Answers

0
votes

Well, I recommend the following steps to troubleshoot this problem:

  1. In a previously finished build in Job C, check Parameters to see if parameters did be passed in by Job B. If those parameters are not there, then you may want to check the parameterized build trigger configuration in Job B to see if it's correctly configured.
  2. Try to print the parameters in a shell script using echo in the downstream job (e.g. Job C) to see if you can see the parameter in the console log. For example, echo $foo.
  3. If you use Groovy script, make sure to use System.getenv() to get environment variables. For example, def foo = System.getenv()["foo"].