mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Merge 5db073f022
into ffa967c94b
This commit is contained in:
commit
643419ddc7
1 changed files with 69 additions and 0 deletions
69
Jenkinsfile
vendored
Normal file
69
Jenkinsfile
vendored
Normal 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/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue