Out-of-the-box Source Code Repository Integration


:rocket: Generally Available

This integration is in general availability. To find more information about the release stages of our integrations, see Release Stages.

The LeanIX VSM Bitbucket Repository integration offers an easy way to auto-discover all your services from Bitbucket workspaces. Based on this VSM's mapping inbox allows you to easily sift through all the stale information from Bitbucket Repos to decide, which services are really useful to your organization and hence should be part of your service catalog. This will help you to maintain a high standard of data quality when you subsequently map your services to their individual teams to create clear team ownership.

Integrate with Bitbucket to:
  • Automatically discover your services to build your company-wide service catalog
  • Automatically determine the health of your software build process by means of DORA metrics


The Bitbucket repository connector scans your "Bitbucket Repos" organization(s) to fetch your repositories and adjacent information,
such as the programming languages used. The integration can be set up in full self-service via the Admin UI.

Configuration from VSM

To integrate Bitbucket with LeanIX VSM you need to:

  1. Access Integrations in VSM
  2. Connect to Bitbucket via VSM
  3. Select relevant Workspaces
  4. Check scan progress

Access Integrations in VSM

In your LeanIX VSM workspace, go to Administration > Integrations and follow the instructions to set up the Bitbucket Repos integration.

Bitbucket Repository Integration setup in the Integrations page

Bitbucket Repository Integration setup in the Integrations page

Connect to Bitbucket via VSM

Please refer to the official documentation for Bitbucket OAuth

  1. Ensure you have admin access on the target Bitbucket workspace
  2. Grant access to VSM OAuth Consumer:
    The required permissions to grant access to the VSM OAuth consumer are:
    1. Account information: used to verify user role within the workspace.
    2. Repositories and their pull requests: used to map your Bitbucket repositories to VSM services.
    3. Team membership information: used to map your Bitbucket teams into VSM teams.
    4. Repositories' webhooks and Repositories' issues: used to create and listen to webhooks.
Confirm access to your account page

Confirm access to your account page

Select relevant Workspaces

After granting access to the VSM Oauth consumer, VSM will look into the workspaces that you have access to, and based on the level of permissions a list will be compiled and presented in VSM.

List of potential configurations panel

List of potential configurations panel

Check scan progress

Once you have selected the workspaces that you want to add to VSM, a new configuration will be created for each workspace.

Bitbucket Integration - List of configurations page

Bitbucket Integration - List of configurations page

After the creation of a new configuration, an automatic scan would start. You can monitor this through the logs of each configuration.

Bitbucket Integration - Configuration Logs page

Bitbucket Integration - Configuration Logs page

How to map your discovered repositories to VSM service catalog items?

After the integration successfully loaded all your repositories into the VSM mapping inbox you can now start to sift through and decide which of these repos are actually worthy to maintain in the service catalog. The repositories will arrive in the mapping inbox as {project}/{repo}. To continue the mapping:

  1. Head over to Mapping Inbox and select the source based on the selected workspaces in the previous steps.
Mapping inbox - Selecting Sources

Mapping inbox - Selecting Sources

  1. Import the unmapped service entry to an existing service or create a new VSM service for the service catalog.
Mapping inbox - List of Unmapped Items

Mapping inbox - List of Unmapped Items

  1. Congrats! you have now created your first VSM service - neat & tidy. Go ahead and explore what it has to offer and map it to
    your teams.

DORA Metrics

The Bitbucket repository integration automatically fetches information for two of the most important DORA metrics:

  1. Deployment frequency: Number of deployments to production for a team.
  2. Lead time for changes: Time from committing a change to code successfully running in production.

To have the two metrics show up for your teams you need to add team members with their email addresses that they use within Bitbucket - most likely those are your corporate email addresses. Once set up the system will start calculating the DORA metrics.

Imported data

The integration retrieves the following pieces of information from your Bitbucket workspaces:

  1. Metadata, such as repository name, description, url etc.
  2. Repository visibility e.g. private, public
  3. Repository language e.g. python
  4. Repository pull requests and commits