Although this answer is helpful if you're passing a string parameter, it would be even more useful if it showed the syntax for passing integers and other data type.
The best and easiest way to get the step right is to use Snippet Generator. It will give you an UI familiar from the Freestyle Projects and as a result a valid Pipeline code that you can just paste in your Pipeline.
Comments
7 comments
Although this answer is helpful if you're passing a string parameter, it would be even more useful if it showed the syntax for passing integers and other data type.
It would also be better if you knew how to find the name of the job you want to start. what if it is in another folder?
Tim/Wojciech,
The best and easiest way to get the step right is to use Snippet Generator. It will give you an UI familiar from the Freestyle Projects and as a result a valid Pipeline code that you can just paste in your Pipeline.
I have a job with about 25 parameters.
Is there a way to pass all the parameters down to downstream jobs, instead of
specifying each parameter inside the pipeline script's build command?
Hi Craig,
Defaults should kick in if you omit the parameter. Just supply the parameters that need overriding.
Any idea how to read this parameter in downstream job ? I tried echo "${ParamA}" its failing giving error as missing property ParamA.
Thanks got it. I missed to add parameters in upstream job.
Please sign in to leave a comment.