title: Jenkins lockable resource - lock without unlocking
body: <p>I'm using the "Locable Resources Plugin" together with the Jenkins multipipeline functionality:</p>
  
  <pre><code>lock('my-resource-name') {
  
  }
  </code></pre>
  
  <p>I have a situation where I need to lock a resource in one pipeline and unlock it in another. I have workarounds, but I would prefer using the lock plugin, if possible. </p>
  
  <p>I imagagine something like this</p>
  
  <pre><code>lock("my-resource-name")
  ..... 
  unlock("my-resource-name)
  </code></pre>
  
  <h3><em>The why of it</em></h3>
  
  <p>I'm implementing canary releases, and there are three different paths through my pipeline (I considered other solutions, like pausing the pipeline with the input plugin - providing me with more is out of scope for this question).
  I would like to lock/halt the pipeline while the canary is evaluated, and then, when the promotion or rollback is done, unlock it again.
  Omitting the body for the <code>lock</code> statement just gives me <code>java.lang.IllegalStateException: There is no body to invoke</code></p>