Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to link multiple repositories to a single Bamboo plan?

Chong Jing Hong July 13, 2022

I have a Bamboo plan, I want to link multiple Bitbucket repositories to it such that the plan runs whenever code is pushed to whichever repository. How do I achieve this? Thank you

2 answers

0 votes
jvelapol July 25, 2022

I've found that once you manage a Build Plan via Specs, you can no longer interact with it via the UI (other than to "see" what's there - you can no longer make any edits/changes).

What you're probably interested in may be covered in the "Repositories" section of the Spec docs.  Note that I've not gotten this to work unless the extra repos you want to use in the Plan are also Linked repositories, too.  We pull git repos from a variety of sources (on-prem bitbucket server, Github, GitLab, etc) and they're all "Linked repositories".  We use the YAML based specs, and we have, for example:

repositories:
  - linked-repo-name-1
  - linked-repo-name-2

Which works fine for one of our Build Plans.  Note that the name of the linked repos (from the Gear -> Lined repositories menu) in the yaml is the same as the "name" listed in the "Linked repositories" location.

EDIT:  One gotcha that you have to be aware of is that inside the repo that you're adding to the plan as an extra linked repo, you'll need to make sure that you configure the "Permissions" for that linked repo to include the Specs repo, too.  You can find that on the "Permissions" tab of the linked repo.  There will be an error that will point you in that direction, too.

0 votes
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2022

Hello @Chong Jing Hong

Depending on how your repository is configured (Bitbucket, Bitbucket Cloud, Github or plain Git), you will need to configure a repository trigger on the Plan.

The repository trigger will watch for changes to the repositories you have selected or be notified passively (for Bitbucket)

You can find more information here:

 

Regards,

Eduardo Alvarenga
Atlassian Support APAC

Chong Jing Hong July 13, 2022

Hi Eduardo,

Thanks for the reply. But how do I linked the repos to the plan? Whenever I set up a spec repository, the previous repo that was linked would be replaced by the newer repo. And the add repo button is grey-ed out as well, as such: https://imgur.com/a/Rv6oqHx

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2022

Hello @Chong Jing Hong

It can be a permission issue in case you are not an Administrator. It can also be the case of your Plans are using Bamboo Specs. If your plan uses Bamboo specs, you will need to use Specs to modify it.

More information here:

Eduardo Alvarenga
Atlassian Support APAC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events