1

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.

Do someone know this error, has a solution or maybe an idea how to fix or how to debug?

NelDav
  • 785
  • 2
  • 11
  • 30
  • I have exactly the same problem, and it only happens in one project on this runner. Other projects with submodules run fine... – user3696412 Jan 24 '22 at 12:11
  • Very intresting. And there are also submodules in the other projects, which work? – NelDav Jan 26 '22 at 11:15

0 Answers0