Azure Pipelines integration overview
The Azure DevOps extension for SonarQube Cloud is used to manage the integration of SonarQube Cloud with Azure Pipelines. It allows:
- Integrating smoothly SonarQube analysis into your Azure build pipeline. This includes multi-branch analysis features.
- Reporting the analysis' quality gate status right in Azure Pipeline's Build Summary page.
- Checking the SonarQube quality gate status in your Azure release pipeline.
- Monitoring the quality gate status of your projects directly in your Azure DevOps dashboard with the quality gate status widget.
Extension modes
The Azure DevOps extension for SonarQube Cloud can run in one of the following modes depending on your project type:
- .NET: for .NET projects. The SonarScanner for .NET is used.
- Maven or Gradle: for Maven and Gradle projects. The SonarScanner for Maven or SonarScanner for Gradle is used, respectively.
- CLI: for the other project types (C family, JavaScript, TypeScript, Go, Python, PHP, etc.). The SonarScanner CLI is used.
The Azure DevOps Extension for SonarQube Cloud embeds the last compatible version of the SonarScanner for .NET and SonarScanner CLI, which is used by default.
In Maven/Gradle mode, your build task downloads the SonarScanner for Maven or Gradle from the SonarSource binaries site.
In very particular situations, you may not want to use the extension's default version but a specific previous version of the SonarScanner for .NET or CLI. In such a case, you can configure your Azure build pipeline to download this specific version from the SonarSource binaries site (see Using a specific version of SonarScanner for .NET or CLI).
SonarQube tasks used in the pipeline definition
The SonarQube Cloud analysis is integrated into your Azure build pipeline by adding the following SonarQube tasks to your build pipeline definition:
- Prepare Analysis Configuration
- Run Code Analysis
This task starts the SonarScanner for .NET or CLI. In the Maven/Gradle mode, it is replaced by a Maven or Gradle task that downloads the SonarScanner for Maven or Gradle, respectively. - Publish Quality Gate Result
With this task, the quality gate status and a link to SonarQube Cloud are shown in the Azure Pipeline's Build Summary page.
Analysis process overview
The figure below shows the analysis's main steps with the example of a .NET project :
- The pipeline’s Run Code Analysis task starts the SonarScanner for .NET embedded in the Azure DevOps extension for SonarQube Cloud. (The SonarScanner then downloads its binaries from the SonarQube Cloud website.)
- Once the analysis is complete, the scanner sends the results to SonarQube Cloud.
- SonarQube Cloud sends the quality gate status to Azure DevOps. This information is processed through the pipeline’s Publish Quality Gate Result task.

Related pages
- Adding analysis to your Azure pipeline for a Gradle or Maven project
- Adding analysis to your Azure pipeline for a .NET project
- Adding analysis to your Azure pipeline for a C family project
- Adding analysis to your Azure pipeline for a JS, TS, GO, Python, PHP or other project
- Adding analysis to your Azure pipeline for a monorepo
- SonarQube tasks for Azure Pipelines
Was this page helpful?