Steps I used while attempting to duplicate this bug report with git plugin 2.4.0 and git client plugin 1.19.0 :
- Create a multi-configuration Jenkins job "
JENKINS-23714-parameterized-branch-name-ignored" using elastic axis and the axis definition "linux || freebsd" (selects 13 different Unix-like configurations in my test environment) - free style project and a single node has the same behavior
- Add a parameter GIT_BRANCH_NAME to that job, default value master
- Use git as the SCM for the job
- Configure repository as git://github.com/MarkEWaite/git-client-plugin.git
- Configure "Branches to build" as `origin/${GIT_BRANCH_NAME}`
- Add $GIT_BRANCH_NAME as "Additional Behaviours" "Checkout to specific local branch"
- Add an XShell (or shell) build step git branch
- Add an XShell (or shell) build step git log -n 1
When I run that job with the parameter value "master-pom-formatter", it correctly performs the checkout of the origin/master-pom-formatter branch and uses a local branch named master-pom-formatter. The same for other branches.
Since the original submitter did not include a plugin version number which shows the problem, and I can't see it on the most recent release of the plugins, I'm marking this as resolved.
Misfiled.