Add Jenkinsfile
zdm/undo-redo/pipeline/head There was a failure building this commit Details

This commit is contained in:
Kai S. K. Engelbart 2021-12-08 10:42:55 +01:00
parent acb25c3120
commit dc74b78d20
Signed by: kske
GPG Key ID: 8BEB13EC5DF7EF13
1 changed files with 40 additions and 0 deletions

40
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,40 @@
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'
}
}
}
stage('SonarQube Analysis') {
when {
branch 'develop'
}
steps {
withSonarQubeEnv('KSKE SonarQube') {
sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar'
}
}
}
}
post {
success {
archiveArtifacts artifacts: 'target/undo-redo-*.jar'
}
}
}