Created
September 28, 2015 14:45
-
-
Save apemberton/dbc3c45d9f2a92e08c92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage 'build' | |
node { | |
git 'https://github.com/cloudbees/todo-api.git' | |
withEnv(["PATH+MAVEN=${tool 'm3'}/bin"]) { | |
sh "mvn -DskipTests=true clean package" | |
} | |
stash excludes: 'target/*', includes: '**', name: 'source' | |
} | |
stage 'test' | |
parallel 'integration': { | |
node{ | |
unstash 'source' | |
withEnv(["PATH+MAVEN=${tool 'm3'}/bin"]) { | |
sh "mvn clean verify" | |
} | |
} | |
}, 'quality': { | |
node{ | |
unstash 'source' | |
withEnv(["PATH+MAVEN=${tool 'm3'}/bin"]) { | |
sh "mvn sonar:sonar" | |
} | |
} | |
} | |
stage 'approve' | |
timeout(time: 7, unit: 'DAYS') { | |
input message: 'Do you want to deploy?', submitter: 'ops' | |
} | |
stage name:'deploy', concurrency: 1 | |
node{ | |
withEnv(["PATH+MAVEN=${tool 'm3'}/bin"]) { | |
sh "mvn cargo:deploy" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment