event-bus/Jenkinsfile
kske 09d251a02a
All checks were successful
zdm/event-bus/pipeline/head This commit looks good
Add Jenkinsfile
The Jenkinsfile performs packaging and testing on the project. When on
the develop branch, a SonarQube analysis is conducted.
2022-01-09 09:27:44 +01:00

42 lines
647 B
Groovy

pipeline {
agent any
options {
ansiColor('xterm')
}
stages {
stage('Build') {
steps {
sh 'mvn -DskipTests clean package'
}
}
stage('Test') {
steps {
sh 'mvn test'
}
post {
always {
junit '*/target/surefire-reports/*.xml'
publishCoverage adapters: [jacocoAdapter(mergeToOneReport: true, path: '*/target/site/jacoco/jacoco.xml')]
}
}
}
stage('SonarQube Analysis') {
when {
branch 'develop'
}
steps {
withSonarQubeEnv('KSKE SonarQube') {
sh "$SONAR_MAVEN_GOAL"
}
}
}
}
post {
success {
archiveArtifacts artifacts: '*/target/event-bus-*.jar'
}
}
}