-
Bug
-
Resolution: Answered
-
Low
-
None
-
5.10.3, 5.13.0.1
-
Severity 1 - Critical
-
2
-
Summary
- Pre-existent plan branches do not get updated when replaced repository configuration.
Environment
- Bamboo v5.13.0.1
Steps to Reproduce
Git repository has two branches (e.g. master, feature/branch)
- create a Project / Plan (e.g PROJ-PLAN)
- create a Git repository (e.g. Repository A) under Plan configuration >> Repositories tab or Bamboo administration >> Build resources >> Linked repository adding the linked repository to the plan
- add a Source Code Checkout task
- run the build plan
- go to Plan configuration >> Branches tab and add a new branch (e.g. PROJ-PLAN0)
- run a build from this branch
- delete the repository in Bamboo
- add the same Git repository with a different name (e.g Repository B) under Plan configuration >> Repositories tab or Bamboo administration >> Build resources >> Linked repository adding the linked repository to the plan
Subversion does not have branches
- instead of adding Git repository in step 8 from above, repeat steps 7-8 but adding a Subversion repository instead.
Expected Results
- Branches should be disabled
Actual Results
- When using same repository type
After deletion you can notice the Plan will be using Repository B whereas the Branch will be using Repository A configurartionFULL_KEY BUILD_TYPE VCS_LOCATION_ID NAME PLUGIN_KEY PROJ-PLAN0 CHAIN_BRANCH 3047425 Repository A com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git PROJ-PLAN CHAIN 3047426 Repository B com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git - When using different repository type
FULL_KEY BUILD_TYPE VCS_LOCATION_ID NAME PLUGIN_KEY PROJ-PLAN0 CHAIN_BRANCH 3047425 Repository A com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git PROJ-PLAN CHAIN 3047426 Repository B com.atlassian.bamboo.plugin.system.repository:svn
Workaround
- Make sure the branches are are pointing to the correct repository under Branches >> Source repository
- Under Branches >> Source repository, uncheck Override the plan's default repository and Save repository
- Under Branches >> Source repository, check Override the plan's default repository and reconfigure branch.