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

Re-associate Linked Repositories to Plans cause branches to checkout from incorrect branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Low Low
    • None
    • 5.10-OD-02
    • Repository (Bitbucket)

      When a user re-create a Linked Repository and re-associate it with the target Plan, branches checkout from incorrect branch.

      Steps to reproduce
      1. Create a Project & Plan.
      2. Set up a Linked Repository (e.g. Bitbucket) - Don't enable the plan just yet.
      3. Create a Plan branch - Bamboo will automatically configure the Plan branch >> Source repository to override the plan's default repository and checkout from the 'branch' in question.
      4. Run a build in the Plan branch - works fine!
      5. For any particular reason, remove the Linked Repository (e.g. Bitbucket) associated to this Plan directly in Bamboo administration >> Linked repositories.
      6. The Plan will become 'repository' orphan, check in Plan Configuration >> repositories.
      7. However, the Plan branch still show the repository configuration inside Plan branch >> Source repository.
      8. Go back to Bamboo administration >> Linked repositories and recreate the repository (either using the same name or not).
      9. Go back to the Plan and access the Plan Configuration >> Repositories page to reassociate the repository to the plan.
      10. As stated in Step 7, the Plan branch will have the old repository configuration inside Plan branch >> Source repository.
      11. To reload the repository configuration:
        • Uncheck the 'Override the plan's default repository' option and save the page.
        • Check the 'Override the plan's default repository' option and save page.
      12. The page will display the new repository configuration.

      The new repository configuration page should give you the option to select the branch of your choice. If we were previously building the 'develop' branch, then we should be able to select the 'develop' branch now. However, at this point we are no longer able to select the 'Branch' we want to associate with the Plan branch, the field only displays the 'master' branch, and if you try to 'Load Repositories' to refresh the list of branches, Bamboo throws a 'No repositories found for user 'username'.' error.

      Workaround
      1. We can try the 'Change password' option to reload the configurations/branches from the repository (e.g. Bitbucket), the problem is that this doesn't seem to work consistently, some times the option to change the 'Branch' becomes greyed out and some times it works. As a tip, you can also try to reload the configuration and change the 'Repository' field, this will unlock the 'Branch' field and you will be able to select your repository again and the target branch. BAM-17087
      2. You can also try to delete the Plan branch and recreate it. This way Bamboo will automatically create the repository configuration for the Plan branch.

              Unassigned Unassigned
              brosa Bruno Rosa
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: