title: Reusing groovy script in jenkins Declarative pipeline file
body: <p>Is there a way to reuse groovy script loaded once in Jenkinsfile.</p>
  
  <p>Right now this is what I am doing</p>
  
  <pre><code>            steps {
                  script {
                      def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
                      util.runStep1()
                  }
              }
              steps {
                  script {
                      def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
                      util.runStep2()
                  }
              }
              steps {
                  script {
                      def util = load("${env.WORKSPACE}/scripts/build_util.groovy")
                      util.runStep3()
                  }
              }
  </code></pre>
  
  <p>I am doing the same again in post build with multiple script blocks step to send mails.</p>
  
  <p>Is there a better way to do this? I cannot use <a href="https://jenkins.io/doc/book/pipeline/shared-libraries/" rel="noreferrer">shared libraries</a>.</p>