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:
- Connect a Polaris project to a Bitbucket repository - connect a Bitbucket repository to an existing Polaris project.
- Onboard Bitbucket repositories to an existing Polaris application - onboard one or more Bitbucket repositories as new projects in an existing Polaris application.
- Onboard Bitbucket repositories to Polaris applications - onboard one or more Bitbucket repositories as new projects in new or existing Polaris applications.
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:bitbucketscope 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.
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:
- Configure the Secure Tunnel to connect Polaris to your private network. See Add and manage secure tunnels in the Polaris UI.
- Add the Polaris integration IP addresses to your firewall allow list. See Integrations for more information.
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.