Bitbucket Integration

Bitbucket is a Git repository management solution designed for professional teams. It gives you a central place to manage git repositories, collaborate on your source code and guide you through the development flow.

73

What does Opsgenie offer Bitbucket users?

Use Opsgenie's Bitbucket integration to forward certain events (like pull requests, issues and push events) to Opsgenie with detailed information. Opsgenie acts as a dispatcher for Bitbucket alerts, determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls and iOS & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

  • When a pull request is created in your repository in Bitbucket, it creates an alert in Opsgenie.
  • When an issue is created in your repository in Bitbucket, it creates an alert in Opsgenie.
  • When a push is made to your repository in Bitbucket, it creates an alert in Opsgenie.
  • When a pull request is closed in your repository in Bitbucket, it closes the alert in Opsgenie.
  • When an issue is closed in your repository in Bitbucket, it closes the alert in Opsgenie.

Add Bitbucket integration in Opsgenie

  1. Please create an Opsgenie account if you haven't done so already.
  2. Go to Opsgenie Bitbucket Integration page.

🚧

For Free and Essentials plans, you can only add the integrations from the Team Dashboards, please use the alternative instructions given below to add this integration.

  1. Specify who is notified for Bitbucket alerts using the Teams field. Auto-complete suggestions are provided as you type.

📘

An alternative for Step 2) and Step 3) is to add the integration from the Team Dashboard of the team which will own the integration. To add an integration directly to a team, navigate to the Team Dashboard and open Integrations tab. Click Add Integration and select the integration that you would like to add.

  1. Copy the Webhook URL.
  2. Click Save Integration.
2171

Configuration in Bitbucket

  1. In your Bitbucket repository, select the Settings from menu on the left.
  2. Select Webhooks from the left pane.
  3. Click Add webhook.
  4. Paste your Webhook URL into the "Payload URL" field.
  5. Select desired Push, Issues and Pull request triggers from the list.
  6. Make sure the Active option is checked.
  7. Click Add webhook.
2070

Find more information on Bitbucket's Webhooks feature here.

📘

When the Webhook configuration is saved in Bitbucket, a test alert is created in Opsgenie.