Windows-Docker cannot clone submodule
I have a repository with one submodule. The CI is configured to clone the submodule:
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: normal
I then created two jobs. One job to build on debian and one job build on windows. The debian build job works fine the submodule is cloned and the correct commit is checked out.
build:debian:
image: debian
stage: build
tags:
- linux
- docker
script:
- qmake project.pro
- make
But the windows job fails during cloning the submodule:
build:windows:
image: windows
stage: build
tags:
- windows
- docker
script:
- qmake.exe project.pro -spec win32-msvc "CONFIG+=release" -r
- nmake clean
- jom.exe -j4
The error looks like this:
Cloning into 'C:/builds/group_name/project_name/submodule_name'...
fatal: Invalid path 'C:/builds/group_name/project_name/.git/modules/submodule_name': Not a directory
fatal: clone of 'https://gitlab-ci-token:[MASKED]@gitlab.domain.com/group_name/submodule_name.git' into submodule path 'C:/builds/group_name/project_name/submodule_name' failed
Failed to clone 'submodule_name' a second time, aborting
I did not posted the first try since it is the same error message.
I think my configuration is correct since it works on linux runner. And because of that I think it is a bug inside the gitlab-runner. But I am not an expert so feel free to correct me, if you think my configuration is wrong.
Edited by David