Bitbucket Cloud

Integrating your Bitbucket application with DeepSource requires a Bitbucket application and an OAuth consumer. This document outlines the configuration, permission requirements and app configuration to get started with your Bitbucket Cloud account and DeepSource Enterprise.

Creating an OAuth consumer.

  1. On the top right corner, click on your profile picture. From the drop-down menu, select All workspaces.
  2. Click on Manage against the workspace you'd like to create the application in.
  3. Select OAuth consumers from the sidebar and click on Add consumer.
  4. You'd be prompted to fill a form to create a new application. Enter the following details:

📘

Replace ORGANIZATION_NAME with the name of your organization, and HOSTNAME with the actual hostname on which you plan to deploy DeepSource to.

FieldValueExample
NameDeepSource ORGANIZATION_NAMEDeepSource Stark International
Callback URLhttps://`HOSTNAME`/accounts/bitbucket_oauth2/login/callback/bifrost/https://deepsource.stark.com/accounts/bitbucket_oauth2/login/callback/
PermissionsSelect Email & Read for Account.
  1. Click on Save.
  2. It shall provide you with Key and Secret. These values will need to be added in the DeepSource Enterprise admin console.

Configuring the OAuth consumer in the Admin Console

After you create your OAuth consumer, you need to configure it in the Admin Console for the application to use it.

  1. Visit the Admin Console.
  2. Navigate to Application -> Config.
  3. Select the checkbox for Bitbucket.
  4. Fill up the values from the previous step for:
    1. Bitbucket OAuth Key
    2. Bitbucket OAuth Secret
  5. Save.

Creating a Bitbucket application.

Before proceeding with this step, please make sure that your DeepSource instance is running and accessible via Bitbucket.

  1. On the top right corner, click on your profile picture. From the drop-down menu, select All workspaces.
  2. Click on Manage against the workspace you'd like to create the application in.
  3. Select Develop apps from the sidebar and click on Register app.
  4. You'd be prompted to add a Descriptor URL. Add the following URL - "https://`HOSTNAME`/services/atlassian/connect" and click "Register App".
  5. You will get a Client ID and Secret. These values will need to be added in the DeepSource Enterprise admin console.

Configuring the Bitbucket application in the Admin Console

After you create your Bitbucket application, you need to configure these in the Admin Console for the application to use it.

  1. Visit the Admin Console.
  2. Navigate to Application -> Config.
  3. Select the checkbox for Bitbucket.
  4. Fill up the values from the previous step for:
    1. Bitbucket App Client ID
    2. Bitbucket App Secret
  5. Save.