Introduction to Bitbucket Cloud integration

SonarQube Community Build'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 Community Build to easily set up SonarQube Community Build projects.

  • Analyze projects with Bitbucket Pipelines: Integrate analysis into your build pipeline and fail your pipeline if the quality gate fails.

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

SonarQube Community Build doesn’t support various features such as the analysis of multiple branches and pull requests. See Feature comparison table to learn which Bitbucket Cloud integration features are supported by the other SonarQube deployments.

Integration solution overview

Integration is performed at two levels:

  • Global: Within your SonarQube Community Build instance, a “Bitbucket Cloud Configuration” record is used to manage the SonarQube Community Build 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 Community Build to access your Bitbucket Cloud workspace.

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

For SonarQube Community Build integration with Bitbucket Cloud, an OAuth consumer and an API token are needed.

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

  • Setting up Bitbucket Cloud integration at global level This section explains how to set up the integration of your SonarQube Community Build instance with Bitbucket Cloud. You need the global Administer System permission in SonarQube to perform this setup.

  • Importing Bitbucket Cloud repositories Once the integration of your SonarQube Community Build instance with Bitbucket Cloud has been properly set up, you can import a Bitbucket Cloud repository or monorepo to create the corresponding projects in SonarQube Community Build.

  • Adding analysis to Bitbucket pipeline Once you have created your project(s) in SonarQube Community Build, you can add the SonarQube Community Build analysis to your Bitbucket pipeline.

Last updated

Was this helpful?