-
Suggestion
-
Resolution: Fixed
-
1
-
9
-
Summary
Bamboo latest no longer support relative path on .gitmodules
Steps to Reproduce
- create two Git repositories on Bitbucket server
- ssh://git@git.webserver:7999/proj/source.git
- ssh://git@git.webserver:7999/proj/module.git
- under proj/source.git create a .gitmodules
cd source git submodule add ../module
As a result, you should have:
.gitmodules[submodule "module"] path = module url = ../module
- create Application Link between Bamboo and Bitbucket server
- create a Plan and use proj/source.git as repository
- select Use submodules under Advanced options
- run a new build
Expected Results
Bamboo v5.14.5 should have the same behaviour as v5.8.1 checking out submodule using relative path
Bamboo v5.8.1
simple 21-Mar-2017 16:54:38 Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' simple 21-Mar-2017 16:54:38 Updating source code to revision: e227f47ef48b0808ce6d5ffc5844685fb207a050 simple 21-Mar-2017 16:54:38 /usr/bin/git log -1 --encoding=UTF-8 --format=%H HEAD simple 21-Mar-2017 16:54:38 Fetching 'refs/heads/master' from 'ssh://git@git.webserver:7999/proj/source.git'. simple 21-Mar-2017 16:54:38 /usr/bin/git fetch ssh://75087a6d-c182-4c11-8153-062876287a86@127.0.0.1:58186/proj/source.git +refs/heads/master:refs/heads/master --update-head-ok --progress --verbose simple 21-Mar-2017 16:54:38 Warning: Permanently added '[127.0.0.1]:58186' (RSA) to the list of known hosts. simple 21-Mar-2017 16:54:38 From ssh://127.0.0.1:58186/proj/source simple 21-Mar-2017 16:54:38 = [up to date] master -> master simple 21-Mar-2017 16:54:38 /usr/bin/git log -1 --encoding=UTF-8 --format=%H e227f47ef48b0808ce6d5ffc5844685fb207a050 simple 21-Mar-2017 16:54:38 Checking out revision e227f47ef48b0808ce6d5ffc5844685fb207a050. simple 21-Mar-2017 16:54:38 Creating local git repository in '/opt/atlassian/products/bamboo/5.8.1/home/xml-data/build-dir/REP-SRC-JOB1/.git'. simple 21-Mar-2017 16:54:38 /usr/bin/git clone file:///opt/atlassian/products/bamboo/5.8.1/home/xml-data/build-dir/_git-repositories-cache/c3c8a863d9a98c02b1e3201409d88f3d348660b8 -n --reference /opt/atlassian/products/bamboo/5.8.1/home/xml-data/build-dir/_git-repositories-cache/c3c8a863d9a98c02b1e3201409d88f3d348660b8 /opt/atlassian/products/bamboo/5.8.1/home/xml-data/build-dir/REP-SRC-JOB1 simple 21-Mar-2017 16:54:38 Cloning into '/opt/atlassian/products/bamboo/5.8.1/home/xml-data/build-dir/REP-SRC-JOB1'... simple 21-Mar-2017 16:54:39 /usr/bin/git show-ref master simple 21-Mar-2017 16:54:39 /usr/bin/git checkout -f master simple 21-Mar-2017 16:54:39 Already on 'master' simple 21-Mar-2017 16:54:39 Your branch is up-to-date with 'origin/master'. simple 21-Mar-2017 16:54:39 /usr/bin/git remote set-url origin ssh://8346a111-ea35-4116-b64d-e93e8c3ee206@127.0.0.1:58186/proj/source.git simple 21-Mar-2017 16:54:39 /usr/bin/git submodule update --init --recursive simple 21-Mar-2017 16:54:39 Submodule 'module' (ssh://8346a111-ea35-4116-b64d-e93e8c3ee206@127.0.0.1:58186/proj/module) registered for path 'module' simple 21-Mar-2017 16:54:39 Cloning into 'module'... simple 21-Mar-2017 16:54:39 Warning: Permanently added '[127.0.0.1]:58186' (RSA) to the list of known hosts. simple 21-Mar-2017 16:54:39 Submodule path 'module': checked out 'b03523b16dc9baff16b466d0a38cd61e9b0b5ffa' simple 21-Mar-2017 16:54:40 /usr/bin/git remote set-url origin file:///opt/atlassian/products/bamboo/5.8.1/home/xml-data/build-dir/_git-repositories-cache/c3c8a863d9a98c02b1e3201409d88f3d348660b8 simple 21-Mar-2017 16:54:40 Updated source code to revision: e227f47ef48b0808ce6d5ffc5844685fb207a050 simple 21-Mar-2017 16:54:40 Finished task 'Checkout Default Repository' with result: Success
Actual Results
Bamboo does not checkout submodule using relative path
Bamboo v5.14.5
simple 21-Mar-2017 16:36:15 Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' simple 21-Mar-2017 16:36:15 Build always requires a clean checkout simple 21-Mar-2017 16:36:15 Cleaning build directory '/opt/atlassian/products/bamboo/5.14.5/home/xml-data/build-dir/REP-SRC-JOB1' simple 21-Mar-2017 16:36:15 Updating source code to revision: e227f47ef48b0808ce6d5ffc5844685fb207a050 simple 21-Mar-2017 16:36:15 /usr/bin/git log -1 --encoding=UTF-8 --format=%H HEAD simple 21-Mar-2017 16:36:15 Fetching 'refs/heads/master' from 'ssh://git@git.webserver:7999/proj/source.git'. simple 21-Mar-2017 16:36:15 /usr/bin/git fetch ssh://6eecec9d-b2ad-4c27-9d33-38ccb2a13630@127.0.0.1:50834/proj/source.git +refs/heads/master:refs/heads/master --update-head-ok --progress --verbose simple 21-Mar-2017 16:36:15 Warning: Permanently added '[127.0.0.1]:50834' (RSA) to the list of known hosts. simple 21-Mar-2017 16:36:15 From ssh://127.0.0.1:50834/proj/source simple 21-Mar-2017 16:36:15 = [up to date] master -> master simple 21-Mar-2017 16:36:15 /usr/bin/git log -1 --encoding=UTF-8 --format=%H e227f47ef48b0808ce6d5ffc5844685fb207a050 simple 21-Mar-2017 16:36:15 Checking out revision e227f47ef48b0808ce6d5ffc5844685fb207a050. simple 21-Mar-2017 16:36:15 Creating local git repository in '/opt/atlassian/products/bamboo/5.14.5/home/xml-data/build-dir/REP-SRC-JOB1/.git'. simple 21-Mar-2017 16:36:15 /usr/bin/git clone /opt/atlassian/products/bamboo/5.14.5/home/xml-data/build-dir/_git-repositories-cache/c3c8a863d9a98c02b1e3201409d88f3d348660b8 --shared --no-checkout /opt/atlassian/products/bamboo/5.14.5/home/xml-data/build-dir/REP-SRC-JOB1 simple 21-Mar-2017 16:36:15 Cloning into '/opt/atlassian/products/bamboo/5.14.5/home/xml-data/build-dir/REP-SRC-JOB1'... simple 21-Mar-2017 16:36:15 done. simple 21-Mar-2017 16:36:15 /usr/bin/git show-ref master simple 21-Mar-2017 16:36:15 /usr/bin/git checkout -f master simple 21-Mar-2017 16:36:15 Already on 'master' simple 21-Mar-2017 16:36:15 Your branch is up-to-date with 'origin/master'. simple 21-Mar-2017 16:36:15 /usr/bin/git remote set-url origin ssh://e098740c-0434-4983-8fea-71dbd31889b2@127.0.0.1:50834/proj/source.git simple 21-Mar-2017 16:36:15 /usr/bin/git submodule update --init --recursive simple 21-Mar-2017 16:36:15 Submodule 'module' (ssh://e098740c-0434-4983-8fea-71dbd31889b2@127.0.0.1:50834/proj/module) registered for path 'module' simple 21-Mar-2017 16:36:15 Cloning into 'module'... simple 21-Mar-2017 16:36:15 Warning: Permanently added '[127.0.0.1]:50834' (RSA) to the list of known hosts. simple 21-Mar-2017 16:36:15 Repository not found simple 21-Mar-2017 16:36:15 The requested repository does not exist, or you do not have permission to access it. simple 21-Mar-2017 16:36:15 fatal: Could not read from remote repository. simple 21-Mar-2017 16:36:15 simple 21-Mar-2017 16:36:15 Please make sure you have the correct access rights simple 21-Mar-2017 16:36:15 and the repository exists. simple 21-Mar-2017 16:36:15 Clone of 'ssh://e098740c-0434-4983-8fea-71dbd31889b2@127.0.0.1:50834/proj/module' into submodule path 'module' failed error 21-Mar-2017 16:36:15 Checkout to revision e227f47ef48b0808ce6d5ffc5844685fb207a050 has failed.
Possible workarounds:
- Configure repository access keys on agents and use absolute paths in favour of relative ones in the .gitmodule descriptor,
- Bamboo, when Bitbucket server repository is created, generates and configures an SSH key on Bitbucket/repository. The problem can be mitigated by manually adding the same access keys to submodule repositories hold in Bitbucket Server. Once done that Bamboo will be able to successfully checkout the repository with submodules.