Where to put ${library.pipeline-utils.version} when using Git SCM to setup Global Pipeline Library
<p>I am trying to setup a global pipeline library that will be explicitly loaded using <code>@Library()</code> per <a href="https://github.com/jenkinsci/workflow-cps-global-lib-plugin#defining-external-libraries" rel="nofollow">these instruction</a>.  I have this working fine with respect to loading the default library version from master branch.</p>

<p>What I am unable to do is figure out how to configure things so that it can load different branches upon request using the <code>Library('lib-name@branch-name')</code> syntax.  </p>

<p>The instructions say: </p>

<blockquote>
  <p>"When using Legacy SCM, you will need to include ${library.pipeline-utils.version} in the SCM configuration somewhere."</p>
</blockquote>

<p>I have tried using <code>${library.pipeline-utils.version}</code> as the value for the <code>Branch Specifier</code> which is the only logical place I can think to put it. But that just break things.  Attempts to load the library fail with:</p>

<pre><code>Fetching upstream changes from ssh://git@stash:7999/jen/pipeline-utils.git
 &gt; git --version # timeout=10
 &gt; git fetch --tags --progress ssh://git@stash:7999/jen/pipeline-utils.git +refs/heads/*:refs/remotes/origin/*
 &gt; git rev-parse refs/remotes/origin/${library.pipeline-utils.version}^{commit} # timeout=10
 &gt; git rev-parse refs/remotes/origin/origin/${library.pipeline-utils.version}^{commit} # timeout=10
 &gt; git rev-parse origin/${library.pipeline-utils.version}^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
</code></pre>

<p>This makes me think I put the variable in the right place but Jenkins is not interpolating it. (Bug?)</p>

<p>This is using Jenkins 2.7.1 and Pipeline version 2.4</p>