Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. In your SonarQube Server project, go to Project settings > General settings > DevOps platform integration.

  2. 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).

  3. 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:

  1. In Bitbucket Data Center, go to Repository settings > Code Insights.

  2. Add a required report called com.sonarsource.sonarqube.

  3. Select Must pass as the Required status.

  4. 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

Last updated

Was this helpful?