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

Multiple repository checkout in a single task not done in series

    XMLWordPrintable

Details

    Description

      Summary

      When multiple repository is configured in a source checkout task, the checkout is not done in series order.

      Steps to Reproduce

      1. Configure the source checkout task to checkout 3 repository
        1. 1st repository check out to root directory
        2. 2nd repository check out to subdir1
        3. 3rd repository check out to subdir2
      2. Clean the current working directory to prevent pollution
      3. Run the plan

      Expected Results

      Bamboo should checkout the repository in order starting with the 1st, 2nd and 3rd.

      Actual Results

      1. Bamboo checkouts the 3rd repository into subdir2.
      2. Bamboo then checkouts the 1st repository into the root directory and error on it being not an empty directory.
      3. Bamboo clears the whole directory including subdir2 and clones the 1st repository
      4. Bamboo checkouts the 2nd repository into subdir1.
      simple	07-Dec-2016 17:07:18	Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
      simple	07-Dec-2016 17:07:18	Updating source code to revision: 0d8f1eb1fc0b9baadf20563d7a0bbbd26e621ae0
      simple	07-Dec-2016 17:07:18	Fetching 'refs/heads/master' from '<git url>'.
      simple	07-Dec-2016 17:07:19	Checking out revision 0d8f1eb1fc0b9baadf20563d7a0bbbd26e621ae0.
      simple	07-Dec-2016 17:07:19	Creating local git repository in '<working dir>/bbc3/.git'.
      simple	07-Dec-2016 17:07:19	Cloning into '<working dir>/bbc3'...
      simple	07-Dec-2016 17:07:19	done.
      simple	07-Dec-2016 17:07:19	Already on 'master'
      simple	07-Dec-2016 17:07:19	Your branch is up-to-date with 'origin/master'.
      simple	07-Dec-2016 17:07:19	Updated source code to revision: 0d8f1eb1fc0b9baadf20563d7a0bbbd26e621ae0
      simple	07-Dec-2016 17:07:19	Updating source code to revision: 63cbff65f68fc6a11c29a8a60eeb47ec4e445949
      simple	07-Dec-2016 17:07:19	Fetching 'refs/heads/master' from '<git url>bamboo-test'.
      simple	07-Dec-2016 17:07:20	Checking out revision 63cbff65f68fc6a11c29a8a60eeb47ec4e445949.
      simple	07-Dec-2016 17:07:20	Creating local git repository in '<working dir>/.git'.
      simple	07-Dec-2016 17:07:20	fatal: destination path '<working dir>' already exists and is not an empty directory.
      error	07-Dec-2016 17:07:20	Checkout to revision 63cbff65f68fc6a11c29a8a60eeb47ec4e445949 has failed.
      simple	07-Dec-2016 17:07:20	fatal: Not a git repository (or any of the parent directories): .git
      simple	07-Dec-2016 17:07:20	Warning: failed to checkout source code to directory '<working dir>', trying to recover...
      simple	07-Dec-2016 17:07:20	Cleaned source directory '<working dir>'...
      simple	07-Dec-2016 17:07:20	Checking out revision 63cbff65f68fc6a11c29a8a60eeb47ec4e445949.
      simple	07-Dec-2016 17:07:20	Creating local git repository in '<working dir>/.git'.
      simple	07-Dec-2016 17:07:20	Cloning into '<working dir>'...
      simple	07-Dec-2016 17:07:20	done.
      simple	07-Dec-2016 17:07:20	Already on 'master'
      simple	07-Dec-2016 17:07:20	Your branch is up-to-date with 'origin/master'.
      simple	07-Dec-2016 17:07:20	Checkout completed, recover successful.
      simple	07-Dec-2016 17:07:20	Updated source code to revision: 63cbff65f68fc6a11c29a8a60eeb47ec4e445949
      simple	07-Dec-2016 17:07:20	Updating source code to revision: 2b781aae9bb56b2b1b602fee099b4216b5a113c1
      simple	07-Dec-2016 17:07:20	Fetching 'refs/heads/master' from '<git url>bamboo-test2'.
      simple	07-Dec-2016 17:07:21	Checking out revision 2b781aae9bb56b2b1b602fee099b4216b5a113c1.
      simple	07-Dec-2016 17:07:21	Creating local git repository in '<working dir>/bbc2/.git'.
      simple	07-Dec-2016 17:07:21	Cloning into '<working dir>/bbc2'...
      simple	07-Dec-2016 17:07:21	done.
      simple	07-Dec-2016 17:07:21	Already on 'master'
      simple	07-Dec-2016 17:07:21	Your branch is up-to-date with 'origin/master'.
      simple	07-Dec-2016 17:07:21	Updated source code to revision: 2b781aae9bb56b2b1b602fee099b4216b5a113c1
      simple	07-Dec-2016 17:07:21	Finished task 'Checkout Default Repository' with result: Success
      

      This resulted in Bamboo clearing out the 3rd repository.

      Workaround

      Configure separate source checkout task for each repository.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dlee@atlassian.com Deric Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: