Importing Bitbucket workspace
This page helps you understand how to import your Bitbucket workspace into SonarQube Cloud and explains prerequisites and key procedures.
When you import a Bitbucket Cloud workspace to SonarQube Cloud, the corresponding Organization is created in SonarQube Cloud and is bound to the DevOps platform organization. Each SonarQube Cloud organization corresponds one-to-one with a Bitbucket Cloud workspace. See Binding with the DevOps platform for more information.
SonarQube Cloud binds to Bitbucket Cloud using the SonarQube Cloud for Bitbucket Cloud app, which you install from your Bitbucket workspace.
The user account you used for the import is automatically assigned to the organization’s owners group which grants you administration rights on the organization. See User group concept for more details.
Prerequisites
You must be an administrator of the Bitbucket workspace:
You will already be an administrator of your default workspace.
For any other workspace, you have to add your Bitbucket account to a user group with the Administer workspace user right enabled.
You have permission to install apps on the Bitbucket workspace you want to bind.
In SonarQube Cloud, each organization is assigned a subscription plan. Before importing your organization, choose the subscription plan suited to your needs, see Subscription plans for more details. In particular, determine the number of Lines of Code (LOC) you need. See LOC-based pricing for more information.
Import procedure
To import a Bitbucket Cloud workspace to SonarQube Cloud, install the SonarQube Cloud for Bitbucket Cloud app on your Bitbucket workspace, then create your organization.
Installing the app
Log in to SonarQube Cloud with your Bitbucket account.
Select the + menu, then select Create new organization.

Under Import from a DevOps platform, select Bitbucket. An onboarding tutorial opens in SonarQube Cloud. Follow the instructions, then select Install application to continue in Atlassian.
In Atlassian, select Get app.

Select a site to install the app from the drop-down list.

Select Install.
Creating the organization
In Bitbucket, go to your Workspace settings > Forge apps > SonarQube Cloud.

Select Create new organization, confirming the redirect to SonarQube Cloud if prompted.
In Import organization details, SonarQube Cloud suggests a Name and Key for your SonarQube Cloud organization. The key is unique across all organizations within SonarQube Cloud. You can accept the suggestion or change it manually. The interface will prevent you from changing it to an already existing key.
The Automatically import new Bitbucket repositories option is selected by default. It imports newly created repositories, but not existing ones, into SonarQube Cloud. Unselect it to turn the feature off. For more information, see Auto-importing new repositories.
Select Add additional info to add:
An avatar: a small image representing the organization and displayed on the UI near the organization name.
A description of the organization.
A URL: the URL of the homepage of the organization displayed on the UI.
Select the subscription plan for your organization. See Subscription plans for more information.
If you selected a paid plan, select the number of Lines of Code (LOC) for your plan and follow the instructions to enter your billing and payment information.
Select Create Organization. The organization is created and opened in SonarQube Cloud.

Your organization now appears as bound. To verify, go to Administration > Organization settings > Organization binding. In Bitbucket's app settings, you can select Refresh connection status to confirm the binding on Bitbucket's side.
To bind an existing organization to a Bitbucket workspace instead, see Binding to a Bitbucket Cloud workspace.
Related pages
Last updated
Was this helpful?

