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.
|
||||
mvnHome = tool 'M3'
|
||||
}
|
||||
stage('Sonar Quality Analysis'){
|
||||
//stage('Sonar Quality Analysis'){
|
||||
//Run the sonar scan
|
||||
withSonarQubeEnv('sonarqube'){
|
||||
sh 'mvn clean package sonar:sonar'
|
||||
}
|
||||
}
|
||||
stage('Sonar Quality Gate') {
|
||||
timeout(time: 2, unit: 'MINUTES') {
|
||||
def qg = waitForQualityGate()
|
||||
if (qg.status != 'OK') {
|
||||
currentBuild.status='FAILURE'
|
||||
error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
||||
}
|
||||
}
|
||||
}
|
||||
//withSonarQubeEnv('sonarqube'){
|
||||
//sh 'mvn clean package sonar:sonar'
|
||||
//}
|
||||
//}
|
||||
//stage('Sonar Quality Gate') {
|
||||
//timeout(time: 2, unit: 'MINUTES') {
|
||||
//def qg = waitForQualityGate()
|
||||
//if (qg.status != 'OK') {
|
||||
//currentBuild.status='FAILURE'
|
||||
//error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
stage('Build') {
|
||||
// Run the maven build
|
||||
withEnv(["MVN_HOME=$mvnHome"]) {
|
||||
|
|
Loading…
Reference in a new issue