conditional/Jenkinsfile

29 lines
855 B
Text
Raw Normal View History

2018-02-22 22:37:51 +00:00
pipeline {
agent any
stages {
stage('Build') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: '**']],
extensions: [[$class: 'CleanBeforeCheckout']],
userRemoteConfigs: [[credentialsId: 'github-kemitix', url: 'git@github.com:kemitix/conditional.git']]
])
sh './mvnw -B -U clean install'
2018-02-22 22:37:51 +00:00
junit '**/target/surefire-reports/*.xml'
archiveArtifacts '**/target/*.jar'
}
}
stage('Deploy') {
2018-02-24 20:45:38 +00:00
when {
expression {
env.GIT_BRANCH === 'master'
}
}
steps {
sh './mvnw -B -Dskip-Tests=true -P release deploy'
}
}
2018-02-22 22:37:51 +00:00
}
}