Setting up the integration of your project with Bitbucket Cloud
Once your Bitbucket Cloud workspace has been imported to SonarQube Cloud, you can create your SonarQube Cloud project by importing your Bitbucket Cloud repository. The so-created SonarQube Cloud project is bound to its Bitbucket Cloud repository.
With a bound project, various analysis reporting features are supported in Bitbucket Cloud. This page explains how to set them up.
Reporting the quality gate status and analysis metrics to your pull requests in Bitbucket Cloud
For a bound project, the quality gate status and analysis metrics are reported to your pull requests in Bitbucket Cloud. No additional setup is necessary.

Preventing the pull request merge if the quality gate fails
If you use Bitbucket Pipelines, see Bitbucket Pipelines. Otherwise, proceed as described below.
If you know how many builds you have for a pull request, you can run your SonarQube Server analysis and not block the pipeline waiting for results. The SonarQube Server Quality Gate will appear in the build for your PR after the analysis results are available.

You can set the Minimum number of successful builds for the last commit with no failed builds and no in progress in Bitbucket, to the number of builds that run for the pull request.
The blocking of pull requests on quality gate failure is not supported for projects on a monorepo.
Reporting analysis metrics in the Bitbucket repository overview
For a bound project, the analysis metrics of the main branch are reported in the Bitbucket repository overview (for more information, see Viewing the issues detected on a pull request in Butbucket Cloud in Viewing and managing issues in your DevOps platform).
To enable this feature, you must enable the Repository Overview widget.

Enabling the Repository Overview Widget
- In Bitbuck Cloud, retrieve your project.
- Go to Your Repository > Repository settings > SonarQube Cloud > Settings.
- Select Show repository overview widget.

- If you don't see the widget with quality information, make sure that your browser is not using some extensions like AdBlocks. They tend to break the integration of third-party applications in Bitbucket Cloud.
- The Repository Overview always shows the status for the master branch, even if you select another branch. This is a limitation of the current integration with Bitbucket.
Related pages
- Getting started with Bitbucket Cloud
- Importing a Bitbucket Cloud workspace
- Analyzing your repository with Bitbucket Pipelines for SonarQube Cloud
- Creating your project
- Setting project permissions and visibility
- Changing project binding and other parameters
- Customizing the Project Information page
- Deleting your project
- Viewing and managing issues in Bitbucket Cloud
Was this page helpful?