jenkinsjenkins-pluginsjenkins-scriptler

How can I pass parameters to the Jenkins build flow?


How can I pass parameters to the Jenkins build flow?

I have a build flow which runs 4 jobs in sequence . Lets take example :

build("job1", param1:value1, param2:value2)
build("job2", param1:value1, param2:value2)
build("job3", param1:value1, param2:value2)
build("job4", param1:value1, param2:value2)

I am passing 2 parameters to each job. Parameters are same. So I want to pass "param1","param2" to the build flow. How can I do that ?


Solution

  • Pass parameters to the build flow as build ("job1", param1: $parametertothebuildflow1, param2:$parametertothebuildflow1)