8

I have a problem and I'm looking for a direct solution or a workaround.

I have 2 jobs on Jenkins: job A (the upstream job) and job B (the downstream job) that needs to be triggered after job A has finished

I used to solve this problem with: "This project is parameterized" set on job A,B and it worked perfectly fine. but on job B it does not work. When I build with parameter job A, jenkins wants a parameter for job A and then triggering Job B. job B needs a new parameter. Jenkins does not want new parameter for job B. I need to give paramateres both projects. Is there any solution ?

  • 1
    So you have a parameter in JOB A but the same parameter is not passing down to the JOB B? – ANIL Aug 09 '17 at 07:58
  • Job A has a parameters. Job B has also parameters. When I Click > build with parameters > i wrote job a's parameters > triggering job b > job b was built But i need give paramaters for job b – mustafagoksever Aug 09 '17 at 08:11
  • 1
    Maybe I need to pass parameters down project that is job B – mustafagoksever Aug 09 '17 at 08:11

1 Answers1

6

Let's say you need to pass PARAM1 and PARAM2 to JOB B.

Declare PARAM1 and PARAM2 in JOB A, then pass both the parameters to JOB B in the post build action in Trigger Parameterized Job like this:

param1 = $PARAM1

param2 = $PARAM2

Then in JOB B declare param1 and param2.

This should do the trick.

ANIL
  • 2,542
  • 4
  • 25
  • 44