Details
-
Bug
-
Resolution: Fixed
-
Low
-
5.14.1
-
Severity 2 - Major
-
Description
Summary
When multiple repository is configured in a source checkout task, the checkout is not done in series order.
Steps to Reproduce
- Configure the source checkout task to checkout 3 repository
- 1st repository check out to root directory
- 2nd repository check out to subdir1
- 3rd repository check out to subdir2
- Clean the current working directory to prevent pollution
- Run the plan
Expected Results
Bamboo should checkout the repository in order starting with the 1st, 2nd and 3rd.
Actual Results
- Bamboo checkouts the 3rd repository into subdir2.
- Bamboo then checkouts the 1st repository into the root directory and error on it being not an empty directory.
- Bamboo clears the whole directory including subdir2 and clones the 1st repository
- 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.