During getting with Jenkins jobDSL I faced some questions.
It took time to find right solutions so to save your time I post some tips in question-answer manner.
I hope it will help you in your difficult automation path.
How to use Jenkins parameters in groovy code?
Sample code:
... // define parameters as parameters { stringParam('VERSION', '10.2.0.0', '') stringParam('BRANCH', 'master', '') } ... // use it like this branch('remotes/origin/pr/\$BRANCH/merge')
Continue reading “Jenkins jobDSL: simple questions and answers”