title: Can I have an entire declarative pipeline defined and parameterized in a shared library?
body: <p>Essentially I want my Jenkinsfile to look something like this:</p>
  
  <pre><code>@Library('my-descriptive-pipline') _
  myPipeline('arg1','arg2','arg3')
  </code></pre>
  
  <p>Then my shared library (/vars/descriptivePipeline.groovy) would look like this:</p>
  
  <pre><code>pipeline {
      agent any
      options {
        skipDefaultCheckout()
      }
      environment {
      }
      stages {
          stage('stageA') {
              steps {
                  ... Do something with arg1, arg2 or arg3
              }
          }
          stage('stageB') {
              steps {
                  ... Do something with arg1, arg2 or arg3
              }
          }
      ....
  </code></pre>
  
  <p>I want to centralize the pipeline config so I don't have to worry about Jenkinsfile sprawl. Is this possible with declarative pipelines?</p>