title: Build Pipeline using a Branch Parameter
body: <p>I seem unable to create a Jenkins Pipeline job that builds a specific branch, where that branch is a build parameter.</p>
  
  <p>Here's some configuration screenshots:</p>
  
  <p><a href="https://i.stack.imgur.com/Vr81B.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Vr81B.png" alt="param config"></a>
  (i've tried with a Git Parameter and a String Parameter, same outcome)</p>
  
  <p><a href="https://i.stack.imgur.com/vArBx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vArBx.png" alt="branch config"></a>
  (I've tried <code>$BRANCH_NAME_PARAM</code>, <code>${BRANCH_NAME_PARAM}</code> and <code>${env.BRANCH_NAME_PARAM}</code>, same outcome for all variations)</p>
  
  <p><a href="https://i.stack.imgur.com/xPaHc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xPaHc.png" alt="enter image description here"></a></p>
  
  <p>And the build log:</p>
  
  <pre><code>hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/${BRANCH_NAME_PARAM}:refs/remotes/origin/${BRANCH_NAME_PARAM} --prune" returned status code 128:
  stdout: 
  stderr: fatal: Couldn't find remote ref refs/heads/${BRANCH_NAME_PARAM}
  
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
  </code></pre>
  
  <p>I'm obviously doing something wrong - any ideas on what?</p>