Bitbucket integration with DevOps Change Velocity
Summarize
Summary of Bitbucket integration with DevOps Change Velocity
ServiceNow DevOps Change Velocity enables integration with Bitbucket Cloud to track repositories, commits, branches, and pull requests. This integration supports the Code (Repository) capability for Bitbucket, helping customers gain visibility into their development workflows within ServiceNow.
Show less
Authentication methods
ServiceNow supports multiple authentication methods to connect to Bitbucket Cloud:
- Basic Auth: Requires a username and app password from Bitbucket. The app password must include permissions for Account (Read), Projects (Read), Webhooks (Read and write), and Pull requests (Read). This method discovers repositories across all workspaces in the organization.
- OAuth 2.0 - Authorization Code: Involves creating an OAuth consumer in Bitbucket with specified permissions (Account: Read, Projects: Read, Webhooks: Read and write, Pull requests: Read) and providing the ServiceNow instance URL as the callback. This method also discovers repositories across all workspaces but requires that the "This is a private consumer" option is not selected.
- OAuth 2.0 - Client Credentials: Similar to the Authorization Code flow but with "This is a private consumer" enabled. Requires Client ID and Client Secret from Bitbucket’s OAuth consumer settings and the ServiceNow instance URL as the callback. This method is configured within the DevOps Change Velocity workspace UI during onboarding.
- Access Token: Created via Atlassian’s process with necessary permissions (Account: Read, Projects: Read, Webhooks: Read and write, Pull requests: Read) and requires the workspace ID from Bitbucket Cloud workspace settings.
Onboarding Bitbucket to DevOps Change Velocity
Customers can onboard their Bitbucket instance using one of three methods depending on their preference:
- Workspace UI: A guided experience to create, connect, discover, and configure Bitbucket repositories directly within the DevOps Change Velocity workspace.
- Service Catalog: Onboard and configure Bitbucket through the ServiceNow Service Catalog interface.
- Classic UI: Use the Classic UI for connecting and configuring Bitbucket if preferred.
This flexibility allows customers to choose their preferred onboarding path while ensuring Bitbucket repositories and related data are integrated for enhanced DevOps visibility and management within ServiceNow.
Connect to your Bitbucket instance to track Bitbucket repositories, commits, branches, and pull requests.
Bitbucket integration overview
DevOps Change Velocity supports the Code (Repository) capability for the Bitbucket tool.
Authentication methods
You can connect to Bitbucket Cloud using one of the following authentication methods:
- Basic Auth
-
When you select the credential type as Basic Auth the repositories for all the workspaces in the organization are discovered. You can get the user name and password for Basic Auth from the settings of your Bitbucket account. To copy the user name, navigate to , and copy the user name from the Bitbucket profile settings section. To copy the password, navigate to , and select Create app password. Enter the necessary details and select the required permissions, and then select Create, and copy the password. The following permissions must be selected while creating the credentials:
- Account: Read
- Projects: Read
- Webhooks: Read and write
- Pull requests: Read
- OAuth 2.0 - Authorization Code
- You must create the OAuth consumer in the Bitbucket tool with the required permissions before creating the OAuth record for Authorization Code. You can navigate to Workspace settings > OAuth consumers > Add consumer in Bitbucket to add the OAuth consumer.
Select the following permissions for the OAuth consumer.
- Account: Read
- Projects: Read
- Webhooks: Read and write
- Pull requests: Read
Ensure that the This is a private consumer option isn’t selected. You must enter your ServiceNow instance URL in the Callback URL field in the following format.https://<instanceurl>/oauth_redirect.doYou can create an OAuth 2.0 - Authorization Code credential by performing the steps specified in the Set up OAuth 2.0 Authorization Code for Bitbucket Cloud procedure.
- OAuth 2.0 - Client Credentials
- You must create the OAuth consumer in the Bitbucket tool with the required permissions before creating the OAuth record for Client Credentials. You can navigate to Workspace settings > OAuth consumers > Add consumer in
Bitbucket to add the OAuth consumer.
Select the following permissions for the OAuth consumer.
- Account: Read
- Projects: Read
- Webhooks: Read and write
- Pull requests: Read
Ensure that the This is a private consumer option is selected as well. You must enter your ServiceNow instance URL in the Callback URL field in the following format.You can create an OAuth 2.0 - Client Credential record in the workspace UI while onboarding the tool. You need the Client Id and Client secret values of your Bitbucket workspace. Client ID of your Bitbucket tool is available in the OAuth consumers section of your workspace settings (Workspace settings > OAuth consumers > Add consumer) in the Key field. Client secret of your Bitbucket tool is available in the OAuth consumers section of your workspace settings (Workspace settings > OAuth consumers > Add consumer) in the Secret field.https://<instanceurl>/oauth_redirect.do - Access Token
- You can create the access token by performing the steps specified in the Atlassian documentation. Ensure that the following permissions are provided while creating the access token:
- Account: Read
- Projects: Read
- Webhooks: Read and write
- Pull requests: Read
You also need the workspace ID of your Bitbucket workspace. Copy it from the Workspace ID field in the Workspace settings of your Bitbucket Cloud account.
Get started
Use one of the following options to onboard Bitbucket. For a guided experience, use the workspace to onboard a tool. Alternatively, you can use the Service Catalog or Classic experience.