Last updated Mar 3, 2022

Rate this page:

Import components from Bitbucket

Bitbucket Cloud is a Git-based code hosting and collaboration tool, built for teams.

Compass currently supports Bitbucket Cloud as a tool to:

  • import components from Bitbucket repositories to track them in Compass
  • automate component management from an external tool with config-as-code
  • sync component data, such as deployment activity, from Bitbucket to Compass

Components are software artifacts such as services, applications, and libraries. They usually live in repositories in source code management tools, such as Bitbucket Cloud. You can create a catalog listing of these components in Compass by importing them from their Bitbucket repositories.

The process to import component from Bitbucket repositories involves:

  1. integrating Compass with Bitbucket Cloud
  2. selecting the repositories to import
  3. optionally, letting Compass set up config-as-code for your components during the import process

We’ll show you how to import components from Bitbucket repositories.

Before you begin

Before you start importing components, integrate Compass with Bitbucket Cloud:

  1. Install the Bitbucket Cloud app in Compass. Select Apps from the top navigation and select Install on Bitbucket tile.
  2. Select Configure on the Bitbucket tile and connect Compass to the Bitbucket workspace containing your component’s repositories.

Learn more about integrating Compass with Bitbucket Cloud

Import components from Bitbucket

  1. In Compass, select Create from the top navigation bar.
  2. Select Import components, then select Configure in front of the Bitbucket option.
    • If you haven’t installed Bitbucket yet, you’ll see the Install in front of the Bitbucket option instead. Select it to complete the Bitbucket app installation first, then come back here.
  3. Update Bitbucket permissions for Compass, if you’re prompted to do so.
    • This one-time authorization grants Compass permissions to add the compass.yml configuration files in your repositories. Compass also raises pull requests to merge the changes.
  4. Select Select repositories in the Import components section.
  5. Select repositories containing the components you want to import into Compass.
    • The Status column shows you whether a repository is available for import.
  6. Select a component type for each component, and proceed to the next step.
    • Select the component type carefully. You won’t be able to change it once the import completes and creates the component’s catalog listing in Compass.
  7. Select Set up configuration files for all the components to let Compass set up config-as-code for the components you are importing.
    • If you select this option, Compass adds the compass.yml configuration file to each repository and raises pull requests to merge the changes.
    • If you do not select this option, Compass imports the components without setting up the configuration files. You can set up the configuration files manually later or choose to manage the components in Compass without setting up config-as-code.
    • Learn more about managing components with config-as-code
  8. Select Start import.
  9. Check the status of your import.
    • You’ll be able to see if any components failed to import. Follow the import process to import those components again.
  10. Select Done.
  11. If you chose to set up configuration files during the import, approve and merge the pull requests in Bitbucket to complete the component import process.

Once the import completes, search and view your component in Compass.

If you disconnect your Bitbucket workspace from Compass, any components managed with config-as-code disconnect from their repositories and no longer sync with Bitbucket. But don’t worry, the catalog entries of the components you imported earlier remain intact and you can manage them in Compass.

Rate this page: