Issue
I am wondering is there any way we can pass the value of project parameter as the Git branch to build from.
Below is what I am trying to do:
- Create a Jenkins pipeline project with a build parameter:
- Then I tried to using the project parameter to pass it on (Branches to build)
However the branch_name variable is not resolved from the project parameter.
I could do manually change branch name for every build, but it is far from ideal.
Appreciate for any idea?
Solution
This issue has been reported several times. This works if you disable the "Lightweight Checkout". Apparently the code path is very different if you are using the lightweight checkout, and that has not been resolved, apparently.
See JENKINS-28447
Answered By - Rob Hales
Answer Checked By - Willingham (JavaFixing Volunteer)