I'm having a problem with a Jenkins multibranch pipeline, which is parameterized. The parameters are all declared in the Jenkinsfile.
The problem is that these parameters do not exist on the very first run of the job. So, the very first execution will fail with groovy.lang.MissingPropertyException
. Any subsequent run is now aware of the parameters and will not fail.
Since this is a multibranch pipeline this happens for every new pull request or tracked branch. Is there any workaround to avoid this problem?
I tried setting the parameters in the UI as well, however there is no option on the pipeline configuration page to set parameters. Probably because this is a multibranch pipeline?
Cheers
params
object and accessed them directly. I'll mark it as answer anyway. Thank you! – Contamination