Я пытаюсь настроить автоматическую сборку в Gitlab CI.
В моем проекте есть подмодуль git.
Я использую Linux docker контейнеровоз.
Gitlab не может проверить подмодуль.
Вот мой файл .gitlab-ci.yml.
stages:
- build
variables:
GIT_SUBMODULE_STRATEGY: recursive
build-backend:
image: mcr.microsoft.com/dotnet/core/sdk:3.1
stage: build
script:
- dotnet publish MyWebApp /p:PublishProfile="MyPublishProfile" /p:Password=1234
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
expire_in: 1 day
paths:
- MyWebApp/bin/Release
Здесь файл .gitmodules
[submodule "MyWebApp/client"]
path = MyWebApp/client
url = git@git.mycompany.abc:company/client/myclient.git
branch = qa
Сообщение об ошибке содержит эту строку
error: cannot run ssh: No such file or directory
Все сообщение об ошибке в gitlab
Running with gitlab-runner 13.1.0 (6214287e)
on runner-docker-builder-5.dev.nsynd.com t8cc1Yme
section_start:1596467453:prepare_executor
Preparing the "docker" executor
Using Docker executor with image mcr.microsoft.com/dotnet/core/sdk:3.1 ...
Pulling docker image mcr.microsoft.com/dotnet/core/sdk:3.1 ...
Using docker image sha256:abc123 for mcr.microsoft.com/dotnet/core/sdk:3.1 ...
section_end:1596467453:prepare_executor
section_start:1596467453:prepare_script
Preparing environment
Running on runner-t8cc1yme-project-440-concurrent-0 via runner-docker-builder-5.dev.nsynd.com...
section_end:1596467456:prepare_script
section_start:1596467456:get_sources
Getting source from Git repository
Fetching changes...
Reinitialized existing Git repository in /builds/company/client/MyWebApp/.git/
Checking out 0a9dd30c as qa...
Updating/initializing submodules recursively...
Synchronizing submodule url for 'MyWebApp/client'
Cloning into '/builds/company/client/MyWebApp/client'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of 'git@git.mycompany.abc:company/client/myclient.git' into submodule path '/builds/company/client/MyWebApp/client' failed
Failed to clone 'MyWebApp/client'. Retry scheduled
Cloning into '/builds/company/client/MyWebApp/client'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of 'git@git.mycompany.abc:company/client/myclient.git' into submodule path '/builds/company/client/MyWebApp/client' failed
Failed to clone 'MyWebApp/client' a second time, aborting
section_end:1596467459:get_sources
ERROR: Job failed: exit code 1
Как в родительском проекте (MyWebApp), так и в подмодуле (MyWebApp / client) у меня есть не настроены ключи развертывания, нет токенов развертывания.