Bitbucket Integration Guide | PagerDuty
Integration Guide for Bitbucket
Bitbucket + PagerDuty Benefits
- Bitbucket is Atlassian’s Git solution for professional teams, featuring pull requests, branch permissions and inline comments.
- Notify on-call engineers about failures within your Bitbucket pipelines.
Requirements
- In PagerDuty: This integration requires a Manager base role or higher to configure.
- In Bitbucket: This integration requires users to be able to edit repository settings.
How it Works
- When there is a failure in your Bitbucket pipelines, a PagerDuty incident will notify on-call responders.
- When the failure recovers, a
SUCCESSFUL
message is sent to PagerDuty and the PagerDuty incident will automatically resolve.
Version
This integration is intended for Bitbucket Cloud.
Integration Walkthrough
In PagerDuty
- In the PagerDuty web app, go to Services Service Directory.
- Select the PagerDuty service you wish to integrate with, then select the Integrations tab.
- Click Add an integration.
- Search for and select Atlassian Bitbucket Pipelines, then click Add.
- You will be taken back to the Integrations tab showing the newly added integration. Click the name of the Atlassian Bitbucket Pipelines integration you created in the previous step.
- Click to copy the Integration URL to your clipboard, which will be in the following format:
https://events.pagerduty.com/integration/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/enqueue
. Keep this URL in a safe place, since you will need it in the next section when you configure a webhook in your Bitbucket account.
In Bitbucket
You will complete the rest of the configuration in Bitbucket, where you will add a webhook that sends build information to PagerDuty.
- Open the repository you want to integrate with PagerDuty. From the left-side navigation, select Repository settings.
- Select Webhooks from the Workflow subheading and click Add Webhook.
- Enter a title, then paste the PagerDuty URL you copied from the previous section into the field URL.
- In the section Triggers, select Build status updated under Repository.
- Click Save.
- Optional: Each repository in Bitbucket can be configured to send failure information to a different PagerDuty service. You can repeat the Integration Walkthrough as many times as needed, if you’d like to integrate PagerDuty with more than one Bitbucket repository.
Updated 4 months ago