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 {
|
2018-02-27 06:56:22 +00:00
|
|
|
git url: 'git@github.com:kemitix/conditional.git',
|
2018-02-26 21:06:12 +00:00
|
|
|
branch: '**',
|
|
|
|
credentialsId: 'github-kemitix'
|
2018-02-24 20:50:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2018-02-27 06:55:23 +00:00
|
|
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
|
|
|
sh "mvn -B -U clean install"
|
|
|
|
}
|
2018-02-22 22:37:51 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-23 18:50:56 +00:00
|
|
|
stage('Deploy') {
|
2018-02-27 06:55:23 +00:00
|
|
|
when { expression { (env.GIT_BRANCH == 'master') } }
|
2018-02-23 18:50:56 +00:00
|
|
|
steps {
|
2018-02-27 06:55:23 +00:00
|
|
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
|
|
|
sh "mvn -B -U -P release deploy"
|
|
|
|
}
|
2018-02-23 18:50:56 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-22 22:37:51 +00:00
|
|
|
}
|
|
|
|
}
|