Configuring Bitbucket Data Center project binding
How to set up Bitbucket Data Center integration features for your SonarQube Server 2026.5 project.
Reporting your quality gate status to Bitbucket for unbound projects
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 save the binding, you need a personal access token stored in SonarQube Server for your user account. The token set on the global DevOps platform integration is not used for this. For more information, see Binding an unbound project.
To report your quality gate status in Bitbucket for unbound projects:
In your SonarQube Server project, go to 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).
Select Save configuration.
Preventing pull request merges when the quality gate fails
After setting up pull request analysis, you can block pull requests from being merged if they fail the quality gate. To do this:
In Bitbucket Data Center, go 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.
Related pages
Binding to Bitbucket Data Center Importing your Bitbucket Data Center repository
Last updated
Was this helpful?

