---
sourceDocument: Australia IT Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/it-service-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Configure SonarQube scans on Jenkins pipelines

# Configure SonarQube scans on Jenkins pipelines {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read  
Configure SonarQube scans on Jenkins pipelines.

## Before you begin

Ensure that you meet the following pre-requisites before configuring your Jenkins pipelines for SonarQube scans

* SonarCloud or SonarQube version 8.6.1 community edition
* SonarQube Scanner for Jenkins 2.4 or higher is installed on your Jenkins instance/environment.
* ServiceNow DevOps plugin version 1.27 or later for Jenkins.
* Ensure that SonarQube scans are configured and exist on your Jenkins pipelines using the SonarQube Scanner plugin for Jenkins. For more information, see
  * [SonarQube Scanner for
    Jenkins](https://www.jenkins.io/doc/pipeline/steps/sonar/)
  * [SonarScanner for
    Jenkins](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/)
  {#config-sonarqube-jenkins-devops__ul_q4f_w44_5pb}
* A SonarQube tool is created and is connected to the SonarQube server. For more information, see [SonarQube integration with DevOps Change Velocity](https://servicenow-prod.fluidtopics.net/J8rc77A_MdH~VU0xGiYVpw "Connect to your SonarQube instance that is integrated with your CI/CD pipelines to retrieve code quality and code security results.").
{#config-sonarqube-jenkins-devops__ul_lr2_kzj_5pb}Role required: sn_devops.admin

## About this task

When you run a pipeline which has SonarQube scan executions, the details are fetched into ServiceNow
DevOps from the Jenkins pipeline. Using the Jenkins plugin, we check if the scan execution is configured in the Jenkins pipeline and check for SonarQube scans on every orchestration stage, using the
`withSonarQubeEnv` tag. If a SonarQube analysis has happened on any stage of the pipeline's execution, as part
of our end notification we add a model with the `scanID` and `url` details for every scan that occurs in a particular stage. These scan analytics or details are correlated and displayed in the
Software Quality Summary related list from Change requests and Task executions.

## Procedure

1. In Jenkins, navigate to Manage JenkinsConfigure System, select the Enable injection of SonarQube server configuration as build environment variables check box in the SonarQube Servers section, and fill in the fields.  
   {#config-sonarqube-jenkins-devops__table_dly_pp4_5pb__entry__2}

   | Field | Description |
   |-|-|
   | Name | A unique name for the configuration/project. |
   | Server URL | URL or IP address of the SonarQube server. |
   | Server authentication | Select the relevant authentication token type for the configuration. |
   [Table 1. SonarQube Installations]

   {#config-sonarqube-jenkins-devops__table_dly_pp4_5pb}  
   Note:  
   Use these same SonarQube server details or values while creating the SonarQube tools in ServiceNow DevOps as well as in the Jenkins pipeline.
2. Click Test Connection.  
   Verify that the connection successful message is shown.
3. Click Apply and Save.
4. Run the pipeline.

## Result

Based on the scan results on various stages of pipeline's execution, the results are shown in the corresponding step of the pipeline. Inbound events are created for notifications and subflows are triggered based on the notification type and capability.

## What to do next

Note:  
Navigate to the pipeline UI to view the scan details under the QualitySoftware Quality Results.

* View scan details as part of Task Executions. View details of all the Sonar scans that are part of the task execution mapped to a build or release pipeline execution step.  
  1. Navigate to DevOpsOrchestrateTask Execution click a relevant Task Execution record.
  2. Click the Software Quality Summary related list.
  3. Click a relevant Scan ID record.
  {#config-sonarqube-jenkins-devops__ol_gbz_zrb_wpb} The Software Quality Scan Summary and Scan Details are displayed.
* View scan details as part of Change Request. View all the scans that were part of this build/release pipeline in the Software Quality ResultsSoftware Quality Summary related list.  
  1. Navigate to DevOpsOrchestratePipeline Change Requests
  2. Click the Software Quality Summary related list.
  3. Click a relevant Scan ID record.
  {#config-sonarqube-jenkins-devops__ol_y2q_wsb_wpb}The Software Quality Scan Summary and Scan Details are displayed.
{#config-sonarqube-jenkins-devops__software-quality-summary}

*[\>]: and then


