Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - passing variables between jobs?

I have two jobs in jenkins, both of which need the same parameter.

How can I run the first job with a parameter so that when it triggers the second job, the same parameter is used?

like image 787
Stefan Kendall Avatar asked Mar 14 '12 15:03

Stefan Kendall


People also ask

How do you transfer workspace and environment variables in a pipeline to the next job?

Under Build Environment check Set environment variables through a file. give the path of that file here. If the environment variable is created in the first job then again you can save all the environment variable in a file and browse it using the above method. Install this plugin and go to job configuration paeg.


1 Answers

You can use Parameterized Trigger Plugin which will let you pass parameters from one task to another.

You need also add this parameter you passed from upstream in downstream.

like image 173
Łukasz Rżanek Avatar answered Sep 23 '22 15:09

Łukasz Rżanek