Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17874

Recreating repository requires reconfiguring branches in Source repository tab

    XMLWordPrintable

Details

    Description

      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)

      1. create a Project / Plan (e.g PROJ-PLAN)
      2. 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
      3. add a Source Code Checkout task
      4. run the build plan
      5. go to Plan configuration >> Branches tab and add a new branch (e.g. PROJ-PLAN0)
      6. run a build from this branch
      7. delete the repository in Bamboo
      8. 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

      1. 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 configurartion
        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.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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rsperafico Rafael Sperafico (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: