This commit is contained in:
Michaël Pailloncy 2017-04-20 09:09:46 +00:00 committed by GitHub
commit 643419ddc7

69
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,69 @@
pipeline {
agent none
stages {
stage("build") {
agent { label "build" }
tools {
maven "M3"
}
steps {
sh "mvn clean package"
}
post {
always {
archive "target/*.jar"
junit 'target/surefire-reports/*.xml'
stash includes: "**", name: "sources"
stash includes: "target/*.jar", name: "binary"
}
}
}
stage("tests") {
steps {
parallel (
"static-analysis": {
node("build") {
unstash "sources"
withMaven(maven:"M3") {
withSonarQubeEnv('sonarqube') {
sh 'mvn sonar:sonar'
}
}
sleep 30
}
},
"performance-tests": {
node("build") {
echo "performance tests"
sh "ls -rtl"
sleep 20
}
}
)
}
}
stage("user-interaction") {
agent none
steps {
input "Deploy ?"
}
}
stage("deploy") {
agent { label "ssh" }
steps {
unstash name:"binary"
sh "ls -rtl target/"
}
}
}
}