Bitbucket
Port's Bitbucket integration allows you to model Bitbucket resources in your software catalog and ingest data into them.
Overviewโ
This integration allows you to:
- Map and organize your desired Bitbucket resources and their metadata in Port (see supported resources below).
- Watch for Bitbucket object changes (create/update/delete) in real-time, and automatically apply the changes to your software catalog.
- Manage Port entities using GitOps.
Supported resourcesโ
The resources that can be ingested from Bitbucket into Port are listed below.
It is possible to reference any field that appears in the API responses linked below in the mapping configuration.
Setupโ
To install Port's Bitbucket app, follow these steps:
-
Go to the Bitbucket app installation page.
-
Click
Get it now
. -
Select your desired workspace and click on
Grant access
. -
Once the installation has finished, you will be redirected to Port.
Configurationโ
Port integrations use a YAML mapping block to ingest data from the third-party api into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
To ingest Bitbucket objects, use one of the following methods:
- Using Port's UI
- Using Bitbucket
To manage your Bitbucket integration configuration using Port:
- Go to the data sources page of your portal.
- Under
Exporters
, click on your desired BitBucket organization. - A window will open containing the default YAML configuration of your BitBucket integration.
- Here you can modify the configuration to suit your needs, by adding/removing entries.
- When finished, click
resync
to apply any changes.
Using this method applies the configuration to all repositories in your Bitbucket workspace.
When configuring the integration using Port, the YAML configuration is global, allowing you to specify mappings for multiple Port blueprints.
To manage your Bitbucket integration configuration using a config file in BitBucket:
- Go to the data sources page of your portal.
- Under
Exporters
, click on your desired BitBucket organization. - A window will open containing the default YAML configuration of your GitHub integration.
- Scroll all the way down, and turn on the
Manage this integration using the "port-app-config.yml" file
toggle.
This will clear the configuration in Port's UI.
When configuring the integration using BitBucket, you can choose either a global or granular configuration:
- Global configuration: create a
.bitbucket-private
repository in your workspace and add theport-app-config.yml
file to the repository;- Using this method applies the configuration to all repositories in your Bitbucket workspace (unless it is overridden by a granular
port-app-config.yml
in a repository);
- Using this method applies the configuration to all repositories in your Bitbucket workspace (unless it is overridden by a granular
- Granular configuration: add the
port-app-config.yml
file to the root of your desired repository;- Using this method applies the configuration only to the repository where the
port-app-config.yml
file exists.
- Using this method applies the configuration only to the repository where the
When using global configuration using Bitbucket, the configuration specified in the port-app-config.yml
file will only be applied if the file is in the default branch of the repository (usually main
).
When using Port's UI, the specified configuration will override any port-app-config.yml
file in your BitBucket repository/ies.
Capabilitiesโ
Ingesting Git objectsโ
By using Port's Bitbucket app, you can automatically ingest Bitbucket resources into Port based on real-time events.
The app allows you to ingest a variety of objects resources provided by the Bitbucket API, including repositories, pull requests and more. It also allows you to perform "extract, transform, load (ETL)" on data from the Bitbucket API into the desired software catalog data model.
The Bitbucket app uses a YAML configuration file to describe the ETL process to load data into the developer portal. The approach reflects a golden middle between an overly opinionated Git visualization that might not work for everyone and a too-broad approach that could introduce unneeded complexity into the developer portal.
After installing the app, Port will automatically create a service
blueprint in your catalog (representing a BitBucket repository), along with a default YAML configuration file that defines where the data fetched from BitBucket's API should go in the blueprint.
Permissionsโ
Port's Bitbucket integration requires the following scopes:
account
;repository
;pullrequest
.
You will be prompted to confirm these permissions when first installing the App.
Examplesโ
Refer to the examples page for practical configurations and their corresponding blueprint definitions.
Relevant Guidesโ
For relevant guides and examples, see the guides section.
GitOpsโ
Port's Bitbucket app also provides GitOps capabilities, refer to the GitOps page to learn more.
Advancedโ
Refer to the advanced page for advanced use cases and examples.