Triggering a Bamboo build from Bitbucket Cloud using Webhooks
Webhooks provide a way to allow Bitbucket Cloud to make requests to your server whenever certain events occur in Bitbucket Cloud. The purpose of this guide is to help you setup a webhook that will trigger a Bamboo build from Bitbucket Cloud after certain events like creating a branch or pull request, or pushing a commit.
- When creating or editing a repository, turn on the Enable webhooks flag in the main configuration section.
- Register and configure a webhook either from Bamboo or Bitbucket Cloud in one of the following ways:
- From Bamboo, use the Register webhook button just below the Enable webhooks flag on the repository configuration page. In the dialog configuration screen, use the appropriate option for credentials that have access to the Bitbucket Cloud repository webhooks. Also, provide the URL from which Bamboo is accessible by Bitbucket Cloud. Bamboo takes care of registering all required trigger types.
- From Bitbucket Cloud, add a webhook from the repository by selecting Bitbucket Cloud > Repository > Settings > Webhooks > Add webhook, and then configure the webhook:
- Specify any title for your Webhook that aptly describes it.
- Enter the URL of the Bamboo API to trigger a plan as follows:
- To achieve all the integration capabilities, select all the required trigger types:
- From the list of repository triggers, select Push.
- From the list of pull request triggers, select:
- Save your changes.
Configure your Bamboo plan to trigger a build using the Bitbucket Cloud repository trigger by selecting Actions > Configure plan > Triggers > Add trigger > Bitbucket Cloud repository trigger.
If the plan was created after creating the repository, this is the default trigger for the plan.
That's it! If your webhook doesn't appear to be working, the best place to start troubleshooting is by viewing the request and response at Bitbucket Cloud > Repository > Settings > Webhooks > View requests.
Was this helpful?Yes Provide feedback about this article