I have a parameterized Jenkins job which requires the input of a specific Git branch in a specific Git repo. Currently this parameter is a string parameter.
Is ther
Its quite simple using the "Git Parameter Plug-in".
Add Name like "SELECT_BRANCH" ## Make sure for this variable as this would be used later. Then Parameter Type : Branch
Then reach out to SCM : Select : Git and branch specifier : ${SELECT_BRANCH}
To verify, execute below in shell in jenkins:
echo ${SELECT_BRANCH}
env.enter image description here