mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 22:35:49 +00:00
Commented Sonar
Commented Sonar
This commit is contained in:
parent
114e44ffab
commit
25b17dc4d7
1 changed files with 14 additions and 14 deletions
28
jenkinsfile
28
jenkinsfile
|
@ -9,21 +9,21 @@ node {
|
||||||
// ** in the global configuration.
|
// ** in the global configuration.
|
||||||
mvnHome = tool 'M3'
|
mvnHome = tool 'M3'
|
||||||
}
|
}
|
||||||
stage('Sonar Quality Analysis'){
|
//stage('Sonar Quality Analysis'){
|
||||||
//Run the sonar scan
|
//Run the sonar scan
|
||||||
withSonarQubeEnv('sonarqube'){
|
//withSonarQubeEnv('sonarqube'){
|
||||||
sh 'mvn clean package sonar:sonar'
|
//sh 'mvn clean package sonar:sonar'
|
||||||
}
|
//}
|
||||||
}
|
//}
|
||||||
stage('Sonar Quality Gate') {
|
//stage('Sonar Quality Gate') {
|
||||||
timeout(time: 2, unit: 'MINUTES') {
|
//timeout(time: 2, unit: 'MINUTES') {
|
||||||
def qg = waitForQualityGate()
|
//def qg = waitForQualityGate()
|
||||||
if (qg.status != 'OK') {
|
//if (qg.status != 'OK') {
|
||||||
currentBuild.status='FAILURE'
|
//currentBuild.status='FAILURE'
|
||||||
error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
//error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
||||||
}
|
//}
|
||||||
}
|
//}
|
||||||
}
|
//}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
// Run the maven build
|
// Run the maven build
|
||||||
withEnv(["MVN_HOME=$mvnHome"]) {
|
withEnv(["MVN_HOME=$mvnHome"]) {
|
||||||
|
|
Loading…
Reference in a new issue