Buildkite integrates with Bitbucket to provide automated builds based on your source control. Your code pushes to BitBucket can automatically trigger Buildkite builds, and pull requests can have their build status live-updated as builds progress.
This guide shows you how to setup your BitBucket builds with Buildkite.
On this page:
Once you’ve created a pipeline in Buildkite and pasted in your bitbucket.org’s repository URL, Buildkite will show you setup instructions for configuring your BitBucket webhooks.
You can also find these instructions by following the "Bitbucket Setup Instructions" link on your Buildkite pipeline’s Settings page:
The setup instructions give you a direct link to your Bitbucket repository’s Webhooks settings, instructions, and a custom webhook URL for the pipeline:
Once you’ve followed the link you can add a new webhook:
After filling out the webhook details using the instructions from your Buildkite pipeline settings, click save, and you’re ready to push a build.
If you want your Bitbucket pull request’s build status icons to be updated as builds progress, you’ll need to connect your Bitbucket account with Buildkite. You only need to do this once, and if you don't need build status updates you can skip this step altogether.
To connect your Bitbucket account open Buildkite’s Personal Settings, choose Connected Apps then click the Connect button:
You'll be prompted to give permission for Buildkite to post status updates, and then redirected back to your Connected Apps page.
You can edit the Bitbucket settings for each pipeline from the pipeline’s settings page:
Buildkite Agent’s default source control tool is Git, and doesn’t support Mercurial out of the box. If you want to use Buildkite with a BitBucket Mercurial repository, you’ll need to add your own Mercurial checkout code using a custom Buildkite Agent global checkout hook.