• 1
    • 9
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Summary

      Bamboo latest no longer support relative path on .gitmodules

      Steps to Reproduce

      1. create two Git repositories on Bitbucket server
        • ssh://git@git.webserver:7999/proj/source.git
        • ssh://git@git.webserver:7999/proj/module.git
      2. 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
        
      3. create Application Link between Bamboo and Bitbucket server
      4. create a Plan and use proj/source.git as repository
      5. select Use submodules under Advanced options
      6. 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:

      1. Configure repository access keys on agents and use absolute paths in favour of relative ones in the .gitmodule descriptor,
      2. 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.

          Form Name

            [BAM-18265] gitmodules fail when using relative path

            Hello! We've got the same problem. If we run "Source code checkout" task in build with repository with submodules - we have that problem. We just have upgraded Bamboo to 7.0.4 and Bitbucket to 7.3.1 and using dockerized versions of them. When we were using usual verisions (and older) - no problem occured. Can it be related to docker version of BitBucket Server and Bamboo Server?

            Maxim Danko added a comment - Hello! We've got the same problem. If we run "Source code checkout" task in build with repository with submodules - we have that problem. We just have upgraded Bamboo to 7.0.4 and Bitbucket to 7.3.1 and using dockerized versions of them. When we were using usual verisions (and older) - no problem occured. Can it be related to docker version of BitBucket Server and Bamboo Server?

            Atlassian Update

            Hi everyone,

            Thanks for your interest in this issue.
            This request is considered a potential addition to our longer-term roadmap.

            We'll typically review this request in about 6 months time, at which point we’ll consider whether we need to alter its status.

            For the nearest future we've decided to prioritise other areas of the Bamboo roadmap, including:

            1. Robustness of Plan Branches
            2. Performance and stability improvements
            3. Providing building blocks for High Availability and Disaster Recovery solutions
            4. Improving permission system
            5. Allowing per-project allocation of resources
            6. Improving Bitbucket Server and Jira integrations

            You can learn more about our approach to highly voted server suggestions here.

            To learn more on how your suggestions are reviewed, see our updated workflow for server feature suggestions.

            Kind regards,
            Bamboo Team

            Martyna Wojtas (Inactive) added a comment - Atlassian Update Hi everyone, Thanks for your interest in this issue. This request is considered a potential addition to our longer-term roadmap. We'll typically review this request in about 6 months time, at which point we’ll consider whether we need to alter its status. For the nearest future we've decided to prioritise other areas of the Bamboo roadmap, including: Robustness of Plan Branches Performance and stability improvements Providing building blocks for High Availability and Disaster Recovery solutions Improving permission system Allowing per-project allocation of resources Improving Bitbucket Server and Jira integrations You can learn more about our approach to highly voted server suggestions here . To learn more on how your suggestions are reviewed, see our updated workflow for server feature suggestions . Kind regards, Bamboo Team

            edelldj1 added a comment -

            We just encountered this issue with Bamboo 6.7.1.  Relative submodule paths worked fine in a project where all submodules were publicly readable, but failed in one where they were not.  Bamboo seems to be trying to clone from a relative path on the localhost (127.0.0.1) which doesn't actually exist (but only has this failure when said submodule is not marked with public read permissions).

            Configuring SSH keys didn't work for us, at least not directly.  As a temporary workaround, I disabled the source code checkout step on the plan and replaced it with a shell command step that explicitly invokes the native "git clone --recursive" using the previously setup keys.  

            edelldj1 added a comment - We just encountered this issue with Bamboo 6.7.1.  Relative submodule paths worked fine in a project where all submodules were publicly readable, but failed in one where they were not.  Bamboo seems to be trying to clone from a relative path on the localhost (127.0.0.1) which doesn't actually exist (but only has this failure when said submodule is not marked with public read permissions). Configuring SSH keys didn't work for us, at least not directly.  As a temporary workaround, I disabled the source code checkout step on the plan and replaced it with a shell command step that explicitly invokes the native "git clone --recursive" using the previously setup keys.  

            Marcin Gardias added a comment - - edited

            a.m.mm.work the improvement I mentioned in this comment is included in 6.5 but we don't close this ticket yet as we believe there's more that can be done about this issue.

            Marcin Gardias added a comment - - edited a.m.mm.work the improvement I mentioned in  this comment is included in 6.5 but we don't close this ticket yet as we believe there's more that can be done about this issue.

            Hello,

            was this fixed released in Bamboo 6.5? Or it'll be fixed in following release?

             

            BR,

            Alessio

            Alessio Moscatello added a comment - Hello, was this fixed released in Bamboo 6.5? Or it'll be fixed in following release?   BR, Alessio

            a.m.mm.work we expect Bamboo 6.5 to be released next week.

            Krystian Brazulewicz added a comment - a.m.mm.work we expect Bamboo 6.5 to be released next week.

            Hello mgardias ,

            we really need this feature in my company, since we're struggling with submodule usage, do you know when Bamboo 6.5 will be released?

             

            BR,

            Alessio

            Alessio Moscatello added a comment - Hello mgardias , we really need this feature in my company, since we're struggling with submodule usage, do you know when Bamboo 6.5 will be released?   BR, Alessio

            Marcin Gardias added a comment - - edited

            In Bamboo 6.5, Bitbucker Server repository shows configured public key in 'Advanced' section of the configuration. You can then configure it as access key to submodule repositories in Bitbucket Server or install it as your personal access key in BBS and fix this problem.

            Marcin Gardias added a comment - - edited In Bamboo 6.5, Bitbucker Server repository shows configured public key in 'Advanced' section of the configuration. You can then configure it as access key to submodule repositories in Bitbucket Server or install it as your personal access key in BBS and fix this problem.

            This is not an improvement, this is a regression and should be listed as such.

            Chas Berndt added a comment - This is not an improvement, this is a regression and should be listed as such.

            This bug happens because of the following scenario:

            1. User sets up Bitbucket repository in Bamboo
            2. Bamboo configures SSH access key in Bitbucket Server for repository only, nothing is setup for submodule repositories
            3. When Bamboo tries to checkout repository with submodule, SSH proxy is enabled and Bamboo provides with SSH credentials configured in previous step, but:
              1. It succeeds for main repository since SSH key is configured properly
              2. It fails for submodules since, SSH key which Bamboo provides isn't configured on Bitbucket side for submodule repository.

            Grzegorz Lewandowski added a comment - This bug happens because of the following scenario: User sets up Bitbucket repository in Bamboo Bamboo configures SSH access key in Bitbucket Server for repository only, nothing is setup for submodule repositories When Bamboo tries to checkout repository with submodule, SSH proxy is enabled and Bamboo provides with SSH credentials configured in previous step, but: It succeeds for main repository since SSH key is configured properly It fails for submodules since, SSH key which Bamboo provides isn't configured on Bitbucket side for submodule repository.

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

                Created:
                Updated:
                Resolved: