Running shell scripts in a Jenkins DSL mavenJob
<p>I'm writing a Jenkins (version 2.6) DSL that will allow me to check out and build a Maven project, run a shell script and deploy it to Artifactory.</p>

<pre><code>mavenJob("test-build") {
  multiscm {
    ...
  }
  steps {
    shell ("bash build-scripts/script.sh")
  }
  goals("clean install")
  configure{ project -&gt;
    project/publishers &lt;&lt; 'org.jfrog.hudson.ArtifactoryRedeployPublisher' {
    details {
      artifactoryUrl('&lt;url&gt;')
      artifactoryName('&lt;name&gt;')
      repositoryKey('libs-release-local')
      snapshotsRepositoryKey('libs-snapshot-local')
    }
    deployBuildInfo(true)
    deployArtifacts(true)
    evenIfUnstable(false)
  }
  publishers {
    archiveJunit('target/*/.xml')
    publishBuilder {
      discardOldBuilds(7,10)
    }
  }
}
</code></pre>

<p>The job only works if I remove the <code>steps{}</code> block as <code>steps</code> aren't permitted in a <code>mavenJob</code>. I've tried using a <code>freeStyleJob</code>, but <code>ArtifactoryRedeployPublisher</code> doesn't work.</p>

<p>What do I have to do to run my shell script?</p>