Bitbucket Data Center
Configure Bamboo to use a Bitbucket Data Center repository.
You can specify repositories at the following levels in Bamboo:
- global – repositories are available to all plans in Bamboo.
- plan – repositories are available to all jobs in the Bamboo plan.
- job – repositories are available to all tasks in the Bamboo job.
The recommended approach is to set up linked source repositories at the global level – see Linking to source code repositories.
When you link a repository hosted in Atlassian's Bitbucket Data Center with a build plan in Bamboo, then without any further configuration:
- Bamboo will automatically run a build when changes are pushed to the Bitbucket Data Center repository, without needing to configure polling.
- Bamboo will automatically update plan branches when a developer pushes a new branch to the repository (or deletes a branch).
- You can click through to Bitbucket Data Center to see the commit diff for all files that are part of the changeset.
- Bitbucket Data Center commits that are part of a build are displayed in Bamboo.
- Build results are notified to Bitbucket Data Center (and displayed for the associated commits and pull requests).
Bitbucket Data Center and Bamboo only need to have been connected by creating an application link. Repositories in Bitbucket Data Center are then made available in Bamboo, so it is easy for you to link your Bamboo plan to a Bitbucket Data Center repository.
When you create a plan that uses a Bitbucket Data Center source repository, Bamboo will automatically use the Bitbucket Data Center repository to trigger the build when changes are committed trigger option instead of polling the repository for changes option. This reduces the load on the Bamboo and Bitbucket Data Centers because Bamboo doesn't need to send poll requests (for each branch of each plan) to the Bitbucket Data Center every 3 minutes (the default polling period). Instead, Bitbucket Data Center will trigger Bamboo whenever there is a push to the repository.
Configuration requirements
Navigate to the source repository settings for a plan or job, as described on Linking to source code repositories, then:
- Either select Add repository to add a new repository, or edit an existing repository configuration.
Select Stash from the Repository host list.
Complete the required information:
Name A name that identifies this repository within Bamboo. Server This menu will show all Bitbucket Data Centers that have been linked to Bamboo via an application link. Repository The repository that will be built. This menu will show all repositories on the Bitbucket Data Center that you have permission to access. Branch Select a branch if you want to check out code from a branch other than the default branch.