title: Jenkins Pipeline "Branch Specifier" is not evaluating variables
body: <p>Specifying an environment variable for "Branch Specifier" is a documented option, but when I do so, the environment variable doesn't get evaluated. Instead Jenkins shows an error: <code>Couldn't find remote ref refs/heads/${GITREF}</code></p>
  
  <p>You can see from the screenshot here that the <code>GITREF</code> variable appears to be set as intended, but the error message shows that it is not being used to obtain my Jenkinsfile:</p>
  
  <p><a href="https://i.stack.imgur.com/PrNMu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PrNMu.png" alt="enter image description here"></a></p>
  
  <p>My operation, as I understand it, is:</p>
  
  <ol>
  <li>A Github webhook triggers my job.</li>
  <li>The <strong>Generic Webhook Trigger</strong> plugin sets environment variables from the Github payload.</li>
  <li>Jenkins should checkout the branch indicated by <code>$GITREF</code> but instead uses <code>$GITREF</code> as a string literal.</li>
  </ol>
  
  <p>You can see the relevant part of my job config in this screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/7yvW6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7yvW6.png" alt="enter image description here"></a></p>
  
  <p><strong>Do you have any idea what I need to change?</strong> Any new branch on my git repo may hold changes to the Jenkinsfile, so I want my pipeline configuration to get its Jenkinsfile from whatever branch triggered the current build.</p>
  
  <p>Here's the help text related to using a variable on this config item:</p>
  
  <p><a href="https://i.stack.imgur.com/lOXS0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lOXS0.png" alt="enter image description here"></a></p>