2022-01-09 09:27:44 +01:00
|
|
|
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') {
|
2022-01-09 11:49:10 +01:00
|
|
|
sh 'mvn sonar:sonar'
|
2022-01-09 09:27:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
archiveArtifacts artifacts: '*/target/event-bus-*.jar'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|