Add Jenkinsfile
Some checks failed
zdm/undo-redo/pipeline/head There was a failure building this commit
Some checks failed
zdm/undo-redo/pipeline/head There was a failure building this commit
This commit is contained in:
parent
acb25c3120
commit
dc74b78d20
40
Jenkinsfile
vendored
Normal file
40
Jenkinsfile
vendored
Normal 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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user