Skip to content
This version of SonarQube Server is no longer receiving patches. Please see the latest release for details on updating.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setting up Bitbucket Server integration for your project

How to set up Bibucker Server or Data Center integration features for your SonarQube Server 2025.6 project.

For AI agents: You're in the SonarQube Server 2025.6 documentation. SonarQube Server 2025.6 is no longer patched. To get patches, upgrade to the latest version. For a list of all 2025.6 pages, see the SonarQube Server 2025.6 page index. For the whole site, see the page index or the full text. For another version, replace 2025.6 in the URL with that version. The latest version has no version number in its URL.

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 report your quality gate status in Bitbucket for unbound projects:

  1. In the SonarQube Server UI page of your project, select 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).

Preventing pull request merges when the quality gate fails

After setting up pull request analysis, you can block pull requests from being merged if it is failing the quality gate. To do this:

  1. In Bitbucket Data Center, navigate 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.

Setting up Bitbucket Data Center integration at global level Importing your Bitbucket Data Center repositories

Last updated

Was this helpful?