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