mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-02-20 04:31:11 +00:00
54 lines
1 KiB
Groovy
54 lines
1 KiB
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage("BuildCode"){
|
|
steps {
|
|
sh """
|
|
|
|
./mvnw package
|
|
|
|
"""
|
|
}
|
|
}
|
|
|
|
stage("RunTests"){
|
|
steps {
|
|
sh """
|
|
|
|
./mvnw test
|
|
|
|
"""
|
|
}
|
|
}
|
|
|
|
stage("Sonar-Scanning") {
|
|
steps {
|
|
withSonarQubeEnv('sonarqube') {
|
|
sh """
|
|
|
|
./mvnw clean verify sonar:sonar \
|
|
-Dsonar.projectKey=spring-petclinic \
|
|
-Dsonar.projectName=spring-petclinic
|
|
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("QualityGate"){
|
|
steps {
|
|
timeout(time: 1, unit: 'MINUTES') {
|
|
waitForQualityGate abortPipeline: true
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|