How to be parameterized that 2 projects that are "Build after other projects are built",

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

I have 2 jobs on Jenkins: task A (work upstream) and task B (downstream task), which should be started after the completion of work A

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

+5
source share
1 answer

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

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

param1 = $PARAM1

param2 = $PARAM2

Then in JOB B declare PARAM1 and PARAM2 .

That should do the trick.

+3
source

Source: https://habr.com/ru/post/1270708/


All Articles