accroding to docs:
Configuring runners | GitLab
my gitlab version is v14.4.0(community),my runner version is gitlab-runner:alpine-v14.10.1(k8s type)
when I use this config
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_PATHS: solo-deploy
It can work and just sync solo-deploy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
when I use this config
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_PATHS: apis
It can work and just sync apis
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
but when I use this config, it can’t work and report error: pathspec 'apis solo-deploy' did not match any file(s) known to git
, I don’t know why, QAQ
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_PATHS: apis solo-deploy
this is .gitmodules file
[submodule "apis"]
path = sudo-apis
url = ../../weixy/apis
[submodule "scripts/odbc_drivers"]
path = scripts/odbc_drivers
url = ../../sgkzr/odbc_drivers
[submodule "scripts/cicd_scripts"]
path = scripts/cicd_scripts
url = ../../sudo/cicd-scripts.git
[submodule "privmesh"]
path = privmesh
url = ../../community/privmesh
[submodule "solo-deploy"]
path = solo-deploy
url = ../../yuzj/solo-deploy
and I find most relative gitlab 14.10 docs
https://archives.docs.gitlab.com/14.10/ee/ci/git_submodules.html,
seem it can’t support GIT_SUBMODULE_PATHS,but when I just config one submodule,it can work.
I find the reason:
although this MR has been merged into runner 14.0 three years agon,but it have bug, can just support one submodule:
so, 9 months ago, this MR merged in to 15.6 to fix it:
so I upgrade my runner to 15.6 then fix this problem