Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Jenkins Pipeline with Sonarqube quality gate status check fail in Jenkins


stage('Sonarqube Analysis') {
            environment {
                scannerHome = tool 'Sonar scanner'
            }
            steps {
                withSonarQubeEnv('Sonarserver') {
                    sh "${scannerHome}/bin/sonar-scanner"
                  }
                if ("${json.projectStatus.status}" == "ERROR") {
                            currentBuild.result = 'FAILURE'
                            error('Pipeline aborted due to quality gate failure.')
                    }

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x