title: Can I wrap a whole stage of a declarative pipeline as groovy library function?
body: <p>I would like to add something like</p>
  
  <pre><code>myStage()
  </code></pre>
  
  <p>to a Jenkinsfile. <code>myStage()</code> is defined in a shared library and contains a whole stage. Is this possible? I read that I can put individual steps and whole pipelines into groovy functions, but are stages possible as well?</p>