Triggering a build from Bitbucket Cloud using the Remote trigger (legacy)
Learn how to set up the Remote trigger to kick off a Bamboo build from Bitbucket Cloud after certain events like creating a branch or pull request, or pushing a commit.
Using this method of triggering builds from Bitbucket Cloud is no longer recommended and should only be used to troubleshoot legacy integrations with Bitbucket Cloud. For new integrations, we recommend that you use webhooks. See Triggering a Bamboo build from Bitbucket Cloud using Webhooks.
- Configure the Bamboo plan to use the Remote trigger:
- From the plan configuration page, select Actions > Configure plan > Triggers > Add trigger > Remote trigger.
- Select Scheduled or Single daily build depending on the times you want your build to run.
- Bamboo displays the available repositories for the plan, as previously configured in the Source repositories tab. Optionally, enter a trigger description. Select the repositories that this trigger should apply to.
In the Trigger IP addresses field, add the IP addresses of the request sources as a comma-separated list.
For the current list of Bitbucket Cloud IP addresses for outbound POST requests by webhooks, see Bitbucket Cloud IP Addresses.
When configuring trigger IP addresses, consider the following:
- CIDR Notation is only supported in Bamboo 5.14 or newer.
- Bamboo's IP allowlist also inspects the X-Forwarded-For HTTP header to determine the origin of the request. If you have a reverse proxy forwarding request to your Bamboo instance, depending on its configuration, you may also need to add the IP address of the proxy server to the allowlist.
- Select Save trigger.
- Add the IP addresses of the request sources to the trigger
- In Bitbucket Cloud, add a webhook from the repository:
- Select Bitbucket Cloud > Repository > Settings > Webhooks > Add webhook.
- Specify any title for your Webhook that aptly describes it.
Enter the URL of the Bamboo API to trigger a plan as follows:
<BAMBOO_URL>/rest/triggers/1.0/remote/changeDetection?planKey=<PLAN-KEY>&skipBranches=false
where<BAMBOO_URL>
is the URL of your Bamboo instance and<PLAN_KEY>
is the key identifying the plan you want to trigger.You can get the plan key from your browser's address bar when viewing the plan in Bamboo.
The
skipBranches
parameter determines whether change detection is triggered by this event for every branch on the plan (false
) or just for the specified plan key (true
).- Select your preferred trigger types.
- Save your changes.