Kubernetes executor not compatible with GIT_SUBMODULE_STRATEGY: normal
Summary
GIT_SUBMODULE_STRATEGY: normal does not work with the Kubernetes executor.
Steps to reproduce
-
Create a repo with a submodule
-
Add this to your .gitlab-ci.yml:
variables: GIT_SUBMODULE_STRATEGY: normal
-
Run a build for a repo that has a submodule with a ssh URI
Actual behavior
Contents of build log:
Updating/initializing submodules...
Submodule 'example_submodule' (git@company.com:Development/test_repo.git) registered for path 'example_submodule'
Cloning into '/Development/test_repo/example_submodule'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of 'git@company.com:Development/example_submodule.git' into submodule path '/Development/test_repo/example_submodule' failed
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1
Expected behavior
Gitlab runner should clone the submodules the same way that it clones the main repo
Relevant logs and/or screenshots
Gitlab Runner Log:
Starting multi-runner from /etc/gitlab-runner/config.toml ... builds=0
Running in system-mode.
Configuration loaded builds=0
Metrics server disabled
Checking for jobs... received job=62412 repo_url=https://company.com/Development/test_repo.git runner=9116c5f1
WARNING: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1 job=62412 project=26 runner=9116c5f1
Environment description
- Gitlab CE 9.3.2
- Gitlab CI Runner 9.3.0 w/ Kubernetes Executor
- Setup according to https://docs.gitlab.com/runner/install/kubernetes.html
- Using this gitlab-runner image https://hub.docker.com/r/gitlab/gitlab-runner/ tag v9.3.0
It is important that the submodule is added with a ssh URI, not HTTPS. I am able to run builds successfully if they don't have submodules.
Edited by username-removed-1504321