Add Jenkinsfile

This commit is contained in:
Michaël Pailloncy 2017-03-06 17:10:17 +01:00
parent fd1c742d4f
commit 4b0e9eac1a

52
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,52 @@
pipeline {
agent { label "build" }
tools {
maven "M3"
}
stages {
stage("prepare") {
steps {
checkout scm
}
}
stage("build") {
steps {
sh "mvn clean package"
}
post {
always {
archive "target/*.jar"
junit 'target/surefire-reports/*.xml'
stash includes:"target/*.jar", name: "binary"
}
}
}
stage("tests") {
steps {
parallel (
"static-analysis" : {
withSonarQubeEnv('sonarqube') {
sh 'mvn sonar:sonar'
}
},
"performance-tests": {
echo "performance tests"
}
)
}
}
stage("deploy") {
steps {
unstash name:"binary"
input "Deploy ?"
}
}
}
}