Linking Bitbucket Cloud repositories with Bamboo
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This article demonstrates the available options that can be used to link Bitbucket Cloud and Bamboo in a similar way as Bitbucket Server and Data Center.
Environment
- Bamboo Server or Data Center
- Bitbucket Cloud Repositories
Diagnosis
Bitbucket Cloud does not integrate with Bamboo in the same way as Bitbucket Server/Data Center does via Application links. Meaning that each repository needs to be created individually.
If you wish Bamboo and Bitbucket Cloud to integrate, Bamboo needs to be configured to use "Bitbucket Cloud" repository types on your Plans/Project/Linked Repositories, and depending on your Bamboo version, you can benefit from branch, code change, and pull request detection integration.
Solution
Be aware of the requirements
- Every repository needs to be recreated in Bamboo. There's no way to change the repository type in Bamboo. The new repository type must be selected as "Bitbucket Cloud"
- Bitbucket Server and Data Center contain a Migration Assistant that can be used to move the data between local Bitbucket and Bitbucket Cloud – You may also choose to move the data between your local Bitbucket instance and Bitbucket Cloud manually
The Bamboo service URL must be exposed to the Internet as HTTPS with a valid certificate so Bitbucket Cloud servers can send Webhook requests to Bamboo to initiate their builds.
Here's a list of IP addresses you must allow incoming traffic on your firewall IP addresses and domains for Atlassian cloud products - Outgoing Connection
Tips and Tricks
Create the Bitbucket Cloud repository in Bamboo the same way as a Bitbucket Server / Stash repository, being it at the Plan, Project or Global (Linked Repository) levels.
- When creating the repository, a combination of username and password will be asked by Bamboo
- Make sure to use your Bitbucket Cloud username (and not the email address) as the account id.
- When authenticating, use the Bitbucket Cloud application password (and not your personal password). Check the following KB article for details on how to obtain it:
- If you don't want to repeat the Bitbucket Cloud username and password on every Repository creation you can use Shared Credentials instead.
Follow the instructions on the Bamboo Bitbucket Cloud repository page for further details.
If you are running Bamboo version 9.0 or later, you can benefit from a seamless integration
- Bamboo 9.0 release notes - Improved integration with Bitbucket Cloud
- Bitbucket Cloud integration with Bamboo
- Triggering a Bamboo build from Bitbucket Cloud using Webhooks - Bamboo 9.3
If you are running Bamboo version 8.2 or earlier, you must run some additional steps to integrate Bitbucket Cloud with Bamboo by manually configuring webhooks
In Bamboo 8.2 and earlier, you will also not benefit from Pull request detection and Enhanced Plan Branches
- Bitbucket Cloud integration with Bamboo (8.2 and earlier)
- Triggering a Bamboo build from Bitbucket Cloud using Webhooks - Bamboo 8.2
Application Tunnels are not supported
Bitbucket Cloud has an open feature request to allow Application Tunnels to be established with other Atlassian Products. We invite you to check it, follow and vote for it. You are also free to add a comment explaining your specific requirement if you feel so.