Creating and configuring your SonarQube Community Build project
Once the global-level integration with Azure DevOps is complete, you can create your SonarQube Community Build project by importing your Azure DevOps repository. You can also create it manually but you won’t benefit from the integration features.
It’s highly recommended to create your SonarQube Community Build project before running your first analysis. Creating the project from the first analysis has side-effects (e.g., you can't choose the main branch name).
Importing your Azure DevOps repository
To import your repository, you need the Create Project permission in SonarQube Community Build.
The so-created SonarQube Community Build project is “bound” to its Azure DevOps repository. With a bound project, you can see in the SonarQube Community Build UI with which repository the project is associated.
To import an Azure DevOps repository into SonarQube Community Build:
- In the top navigation bar of SonarQube Community Build, select the Projects tab.
- In the top right corner, select the Create Project > From Azure DevOps button.
- If your instance has multiple Azure DevOps Integrations, select the Azure DevOps configuration from which you want to import your project.
- Select the repository to be imported.
With SonarQube Server Enterprise Edition, you can import an Azure DevOps monorepo. See SonarQube Server documentation for more information.
Creating your SonarQube Community Build project manually
You need the Create Project permission in SonarQube Community Build.
Proceed as follows:
- In the top navigation bar of SonarQube Community Build, select the Projects tab.
- In the top right corner, select the Create Project > Local Project button.
Configuring the project analysis parameters
You can configure analysis parameters at different levels:
- In your build environment if you have a Maven, Gradle, or .NET project.
- In the
sonar-project.properties
file. - In SonarQube Community Build UI.
- At the Azure pipeline level.
Parameters set at the pipeline level have precedence over parameters set at other levels.
For general information on setting up analysis parameters at the global and project levels, see Analysis parameters and the respective SonarScanner section: Maven, Gradle, .NET, or CLI.
Related pages
Was this page helpful?