Configuring Bitbucket Data Center project binding
How to set up Bibucket Data Center integration features for your SonarQube Server project.
Was this helpful?
How to set up Bibucket Data Center integration features for your SonarQube Server project.
On SonarQube Server projects bound to their Bitbucket repository, SonarQube Server automatically sets up the report of your quality gate status and analysis metrics directly to your pull requests. For unbound projects, you must set up the quality gate status report manually. The integration of your SonarQube Server instance with Bitbucket Data Center must be properly set up.
To report your quality gate status in Bitbucket for unbound projects:
In the SonarQube Server UI page of your project, select Project Settings > General Settings > DevOps Platform Integration.
Set:
Configuration name: The configuration name that corresponds to your DevOps Platform instance.
Project Key: the project key is part of your BitBucket repository URL (.../projects/<key>/repos/<slug>/browse).
Repository SLUG: The repository slug is part of your BitBucket repository URL (.../projects/<key>/repos/<slug>/browse).
After setting up pull request analysis, you can block pull requests from being merged if it is failing the quality gate. To do this:
In Bitbucket Data Center, navigate to Repository settings > Code Insights.
Add a Required report called com.sonarsource.sonarqube
Select Must pass as the Required status.
Select Must not have any annotations as the Annotation requirements.
Preventing pull request merges when the quality gate fails is not supported for monorepos.
Binding to Bitbucket Data Center Importing your Bitbucket Data Center repository
Was this helpful?
Was this helpful?

