Hello everyone. Today I have been trying to get a submodule onto my runner, and I can’t figure out how. I have created two SSCCE repos which demonstrate the issue as I experience it.
https://gitlab.com/briankcook/importme
containing exactly one small text file
https://gitlab.com/briankcook/importer
containing another small text file, and:
.gitmodules:
[submodule "importme"]
path = importme
url = ../importme.git
branch = master
.gitlab-ci.yml:
image: centos:7
variables:
GIT_SUBMODULE_STRATEGY: normal
GIT_STRATEGY: clone
test:
script:
- find /builds/briankcook
As you can see in the job output the runner finds .gitmodules and so says:
Updating/initializing submodules...
… but apparently it does not actually do what it is claiming, since there is no importme directory on the runner!
Does anyone know how to properly configure submodules for CI? I have tried so many minor variations on this theme, and so far had no joy at all.
In the meantime, git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.myworkplace.tld/repo.git is a tolerable workaround, but I want to know how to get submodules to work so I don’t have to take this extra step every time.
Thanks in advance!