# Introduction to Bitbucket Cloud integration

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

{% hint style="info" %}
SonarQube Community Build doesn’t support various features such as the analysis of multiple branches and pull requests. See [feature-comparison-table](https://docs.sonarsource.com/sonarqube-community-build/feature-comparison-table "mention") to learn which Bitbucket Cloud integration features are supported by the other SonarQube deployments.
{% endhint %}

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

<figure><img src="broken-reference" alt="For SonarQube Community Build integration with Bitbucket Cloud, an OAuth consumer and an API token are needed."><figcaption></figcaption></figure>

For information about Bitbucket Cloud authentication solution, see [bitbucket-cloud](https://docs.sonarsource.com/sonarqube-community-build/instance-administration/authentication/bitbucket-cloud "mention").

## Related pages <a href="#related-pages" id="related-pages"></a>

* [global](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/global "mention")\
  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.
* [import-repos](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/import-repos "mention")\
  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.
* [bitbucket-pipelines](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/bitbucket-pipelines "mention")\
  Once you have created your project(s) in SonarQube Community Build, you can add the SonarQube Community Build analysis to your Bitbucket pipeline.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
