SonarQube tasks for Azure Pipelines
Tasks supported by the Azure DevOps Extension for SonarQube Server you can use in your Azure build pipeline.
For information about modifying your Azure pipeline with the task inputs listed on this page, please see the Using various features page. Additionally, you can refer to your specific project type for more scanner-specific details; a full list of project types are found on the Introduction page to this section.
Prepare Analysis Configuration task
This task configures the required settings before executing the build. For .NET solutions or Java projects, it helps integrate seamlessly with MSBuild, Maven, and Gradle tasks.
Run Code Analysis task
This task executes the analysis of the source code. It is not used in the Gradle / Maven mode of the Azure DevOps extension for SonarQube Server.
The table below lists the task inputs.
jdkversion
The version of Java used by the scanner for analysis. See General requirements.
If you select a value other than JAVA_HOME, the analyze task will revert to using JAVA_HOME if the selected environment variable does not exist.
Possible values:
• JAVA_HOME: Use the value of the JAVA_HOME environment variable on the system.
• JAVA_HOME_17_X64: Use the value of the JAVA_HOME_17_X64 environment variable on the system, if available. This environment variable is already set when running on Microsoft-hosted agents.
• JAVA_HOME_21_X64: Use the value of the JAVA_HOME_17_X64 environment variable on the system. This environment variable is already set when running on Microsoft-hosted agents.
Default: JAVA_HOME
Publish Quality Gate Result task
This task allows you to report the quality gate status directly to your Azure Pipeline’s Build Summary page. It is not mandatory but highly recommended.
The table below lists the task inputs.
pollingTimeoutSec
The maximum time (in seconds) for the task to wait for the analysis results sent by SonarQube Server.
Default: 300
Related pages
Last updated
Was this helpful?

