Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - How can i pass parameters from the Upstream to Downstream

I have 3 builds: A - is the Master build which control the flow B- Anoter build C- will be executed after B I want to add a String parameter to A so the user will enter some String manually, and i'm not sure how can i path this parameter to B. lets say that this is my build flow:

build("B") build("C") I don't know how can i path the parameter to B, should i do that from the build flow or from the B build configuration and how can i do that.

Thanks in advance Alex

like image 834
Alex Brodov Avatar asked Aug 14 '14 14:08

Alex Brodov


People also ask

How do you pass parameters in Jenkins pipeline?

Any Jenkins job or pipeline can be parameterized. All we need to do is check the box on the General settings tab, “This project is parameterized”: Then we click the Add Parameter button.

How pass parameters to jobs in Jenkins?

Now you have to configure your Jenkins job. First under General section check “This project is parameterized” option and then select String Parameter option by clicking the “Add Parameter” button. Enter Your parameter name (In my case BROWSER) and default value (In my case Firefox) and click on “Apply” button.


1 Answers

Something like this:

build("B", B_parameter: params["A_parameter"])<br>
build("C")

https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin

like image 87
dspiegel Avatar answered Sep 22 '22 11:09

dspiegel