mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Add Jenkinsfile
This commit is contained in:
parent
fd1c742d4f
commit
4b0e9eac1a
1 changed files with 52 additions and 0 deletions
52
Jenkinsfile
vendored
Normal file
52
Jenkinsfile
vendored
Normal 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 ?"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue