Update Jenkinsfile

This commit is contained in:
Colin McDonald 2017-09-01 12:13:25 -04:00 committed by GitHub
parent 78067c2c51
commit e1b98f782e
1 changed files with 12 additions and 10 deletions

22
Jenkinsfile vendored
View File

@ -1,12 +1,14 @@
node { node {
stage 'Git Clone' stage('Clone') {
checkout scm checkout scm
stage 'Maven Compile' }
if (env.BRANCH_NAME == 'master') {
sh 'mvn clean deploy -U' stage('Build') {
} else { def verb = env.BRANCH_NAME == 'master' ? 'deploy' : 'package'
sh 'mvn clean package -U' sh "${tool 'M3'}/bin/mvn clean ${verb} -U"
} }
stage 'Jenkins Archive'
step([$class: 'ArtifactArchiver', artifacts: 'target/*.jar', fingerprint: true]) stage('Archive') {
archive 'target/*.jar'
}
} }