title: How to Remove Script in Script from Jenkinsfile Steps
body: <p>I am not sure how I would untangle this step in a declarative Jenkinsfile. I was told you cannot have a script inside of a script, so I am looking for help on how this could be refactored.</p>
  <pre><code>stage('Publish Procurement') {
    steps {
        script: '''
          if (0 != sh(script: &quot;git diff --exit-code modules/procurement&quot;, returnStatus: true)) {
            node_modules/.bin/ng build test-library
            cd modules/test-library/dist/
            node_modules/.bin/ng test test-library
          }
        '''
    }
  }
  </code></pre>
  <p>I appreciate any help that is given.</p>