Introduction to Bitbucket Cloud integration

SonarQube Server’s integration with Bitbucket Cloud allows you to maintain code quality and security in your Bitbucket Cloud repositories.

Key features

With this integration, you’ll be able to:

  • Import your Bitbucket Cloud repositories: Import your Bitbucket Cloud repositories into SonarQube Server to easily set up SonarQube Server projects.

  • Analyze projects with Bitbucket Pipelines: Integrate analysis into your build pipeline. SonarScanners running in Bitbucket Pipelines can automatically detect branches or pull requests being built so you don’t need to specifically pass them as parameters to the scanner.

  • Report your quality gate status to your pull requests: See your quality gate and code metric results right in Bitbucket Cloud so you know if it’s safe to merge your changes.

  • Authenticate with Bitbucket Cloud: Sign in to SonarQube Server with your Bitbucket Cloud credentials.

Integration solution overview

Integration is performed at two levels:

  • Global: Within your SonarQube Server instance, a “Bitbucket Cloud Configuration” record is used to manage the SonarQube Server access to your Bitbucket Cloud workspace. This record stores:

    • Your workspace ID.

    • The key and secret of a workspace’s OAuth consumer which is used by SonarQube Server to access your Bitbucket Cloud workspace, either to report the quality gate to pull requests on the repositories you’re analyzing or to import repositories.

  • Project: A project administrator must provide a Bitbucket Cloud API token to import their Bitbucket Cloud repository to SonarQube Server. SonarQube stores this PAT in its database, enabling it to list and import the repositories the administrator can access.

An OAuth consumer and an API token are used for SonarQube integration with Bitbucket Cloud

For information about Bitbucket Cloud authentication solution, see Bitbucket Cloud.

Last updated

Was this helpful?