Add Jenkinsfile
This commit is contained in:
parent
56e38f7191
commit
edf74071dc
1 changed files with 28 additions and 0 deletions
28
Jenkinsfile
vendored
Normal file
28
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
final String gitRepoUrl = 'git@github.com:kemitix/kemitix-parent.git'
|
||||||
|
final String mvn = "mvn --batch-mode --update-snapshots"
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Prepare') {
|
||||||
|
steps {
|
||||||
|
git url: gitRepoUrl, branch: '**', credentialsId: 'github-kemitix'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||||
|
sh "${mvn} clean install"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy') {
|
||||||
|
when { expression { (env.GIT_BRANCH == 'master') } }
|
||||||
|
steps {
|
||||||
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||||
|
sh "${mvn} deploy --activate-profiles release"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue