jenkins: skip test during deploy
This commit is contained in:
parent
32fc97258e
commit
ba587e63a9
1 changed files with 45 additions and 0 deletions
45
Jenkinsfile.groovy
Normal file
45
Jenkinsfile.groovy
Normal file
|
@ -0,0 +1,45 @@
|
|||
final String gitRepoUrl = 'git@github.com:kemitix/mon.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') {
|
||||
parallel {
|
||||
stage('Java 8') {
|
||||
steps {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||
sh 'mvn clean install'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Java 9') {
|
||||
steps {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
|
||||
sh 'mvn clean install'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Reporting') {
|
||||
steps {
|
||||
junit '**/target/surefire-reports/*.xml'
|
||||
archiveArtifacts '**/target/*.jar'
|
||||
}
|
||||
}
|
||||
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 -DskipTests=true"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue