MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

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.')
                    }Code language: JavaScript (javascript)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

How to execute sonarqube scanner using jenkins pipeline?

SonarScanner: Command line SonarScanner for Gradle: SonarScanner for Maven: SonarScanner for .NET: The tool name “SonarQube Scanner 2.8” needs to match the “Name” field of a SonarQube…

Read More

Jenkins Pipeline code for Sending an email on Build Failure

To get an email when a Jenkins build fails, call the mail step (Mailer plugin) or the emailext step (Email Extension plugin) inside the post { failure…

Read More

Jenkins Tutorials: Meaning of $class in scripted pipeline

In a Jenkins Pipeline, $class is a special map key that tells Jenkins which plugin or core class to create when a step or property accepts more…

Read More

Example of sonar-project.properties file

sonar-project.properties is the configuration file SonarScanner CLI reads from a project's root directory. It tells the scanner which project to report to, where the source and test…

Read More

Automating Jenkins Job Configuration: Job DSL, Multibranch, Job Generator, and JJB

Manually creating many Jenkins jobs is slow and error-prone. This guide compares the main automation options and shows practical jobs-as-code examples for repeatable setup.

Read More

Jenkins Troubleshooting Guide: Fast Triage, Log Analysis, and Common Failure Fixes

A practical Jenkins troubleshooting guide for DevOps teams: find the right logs first, separate controller vs. agent vs. job failures, and resolve common outage patterns quickly.

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x