-
Bug
-
Resolution: Fixed
-
Critical
-
None
The first automatic job execution of a job created by a "multibranch project" will be triggered without parameters. e.g. the following pipeline will print "null" instead of the default value of MY_PARAM. Subsequent executions will work correctly. This is very unfortunate, as such jobs are typically created for short lived branches, in the most ideal case, no further commits are even made to them - they get merged and vanish again.
pipeline { parameters { choiceParam(choices: 'AA\nBB', description: 'please select...', name: 'MY_PARAM') } agent any stages { stage ('test') { steps { sh "echo ${env.MY_PARAM}" } } } }
- relates to
-
JENKINS-40241 Detemine parameters before running job
- Closed