added my pipeline script

This commit is contained in:
joe 2017-08-09 17:23:56 -06:00
parent 40a0a87e93
commit 1ddebc7fdc

14
joespipeline Normal file
View file

@ -0,0 +1,14 @@
echo 'Hello from Pipeline Demo'
stage 'Compile'
node {
git url: 'https://github.com/mitesh51/spring-petclinic.git'
sh "/usr/bin/mvn -B compile"
}
stage 'Test'
node('TestServer') {
git url: 'https://github.com/mitesh51/spring-petclinic.git'
sh "/usr/bin/mvn -B verify"
step([$class: 'ArtifactArchiver', artifacts: '**/target/*.war', fingerprint: true])
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
}