Integrate Bitbucket with Polaris

Black Duck Polaris Platform

Polaris supports SCM integration with both Bitbucket Cloud and Bitbucket Data Center. Both types of integration require a valid access token, and Data Center integration requires additional configuration for network access and webhooks.

Supported versions

Polaris supports Bitbucket Data Center versions 8 (8.19 and later), 9 (9.4 and later), and 10 (10.2 and later). For the full list of supported versions, see Polaris Support Information.

Bitbucket Cloud is always on the latest version and does not have a version requirement.

Multiple ways to onboard

You can onboard your repos individually or in bulk. The following procedures explain how to perform onboarding based on your needs:

Authentication

Authentication between Bitbucket and Polaris uses access tokens. The token type depends on your deployment:

  • Bitbucket Cloud - uses a Bitbucket API token. The required scopes depend on the integration type: a read:repository:bitbucket scope is sufficient for single-repository integration; bulk integration and monitoring require additional scopes including webhook and pull request write permissions.
  • Bitbucket Data Center - uses an HTTP access token (personal access token) created within the Bitbucket Data Center instance.

For token creation steps and required scopes for each integration type, see Bitbucket Tokens for SCM Bulk Integration and/or Monitoring.

Note: Bulk integration and monitoring with Bitbucket Cloud require a Bitbucket Cloud Premium subscription. App passwords are deprecated; use API tokens for new integrations.

Bitbucket Data Center: Network access

To connect to a repository hosted in Bitbucket Data Center, Polaris must be able to reach your Bitbucket instance. Use one of the following options:

Bitbucket Data Center: Webhooks

Polaris uses webhooks to trigger event-based test automation and to keep your Polaris configuration in sync with repository changes. In Bitbucket Data Center, webhooks must be configured at the Project or Repository level. Group-level automatic webhook registration, available in some other SCM providers, is not supported in Bitbucket Data Center.

For information on setting up event-based testing after your integration is configured, see Event-Based Test Automation in Polaris for SCM Integrations.