git fetch empty folder
Hi,
I have a pipeline who some jobs failed in my gitlab-ci pipeline on the master branch. I think their jobs failed because the command git fetch
return an empty folder:
Running with gitlab-runner 12.2.0 (a987417a)
on gitlab-runner-rocsimulateur-gitlab-runner-6d9dc687c6-k6bk4 5K-CzUhm
Using Kubernetes namespace: gitlab-runner-rocsimulateur
Using Kubernetes executor with image $REGISTRY_URL/cicd/tools/soapui/testrunner:5.5.0 ...
Waiting for pod gitlab-runner-rocsimulateur/runner-5k-czuhm-project-32-concurrent-1fk7bq to be running, status is Pending
Waiting for pod gitlab-runner-rocsimulateur/runner-5k-czuhm-project-32-concurrent-1fk7bq to be running, status is Pending
Waiting for pod gitlab-runner-rocsimulateur/runner-5k-czuhm-project-32-concurrent-1fk7bq to be running, status is Pending
Waiting for pod gitlab-runner-rocsimulateur/runner-5k-czuhm-project-32-concurrent-1fk7bq to be running, status is Pending
Running on runner-5k-czuhm-project-32-concurrent-1fk7bq via gitlab-runner-rocsimulateur-gitlab-runner-6d9dc687c6-k6bk4...
Fetching changes...
Initialized empty Git repository in /builds/FNMF/ROCSimulateur/.git/
Created fresh repository.
warning: redirecting to https://example.com/FNMF/ROCSimulateur.git/
$ pwd
/builds/FNMF/ROCSimulateur/
$ ls -lR .
.:
total 0
$ chmod u+x ${CI_PROJECT_DIR}/pipeline/tests/integration/format_saml_assertion.sh && ${CI_PROJECT_DIR}/pipeline/tests/integration/format_saml_assertion.sh
$ cp ${CI_PROJECT_DIR}/test/integration/${SOAPUI_PROJECT} ${SOAPUI_HOME}/bin/project
chmod: /builds/FNMF/ROCSimulateur/pipeline/tests/integration/format_saml_assertion.sh: No such file or directory
cp: can't stat '/builds/FNMF/ROCSimulateur/test/integration/ROC_TEST_SIMU_AMC-soapui-project.xml': No such file or directory
Uploading artifacts...
WARNING: results/*.txt: no matching files
WARNING: results/*.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: command terminated with exit code 1
In the current folder in my gitlab-runner, I don't have the ressources presents in my gitlab repo:
$ pwd
/builds/FNMF/ROCSimulateur/
$ ls -lR .
.:
total 0
I have tried to create a new gitlab project, copy all files and folders presents in the original gitlab project and configure my CI/CD configuration and new gitlab-runner.
If I execute my pipeline, all is successed.
The git fetch command is ok.
The difference between this two gitlab repo is:
- the original have 148 commits on master branch
- the new have 20 commits on master branch
- the .git/ folder on original used ~ 170Mb:
--- /home/bcu/work/interamc/ROCSimulateur/.git --------------------------------------------------------------------------------------------------------------------------------------------------------------------
166,3 MiB [##########] /objects
52,0 KiB [ ] /hooks
44,0 KiB [ ] index
36,0 KiB [ ] /logs
32,0 KiB [ ] /refs
8,0 KiB [ ] /info
e 4,0 KiB [ ] /branches
4,0 KiB [ ] packed-refs
4,0 KiB [ ] config
4,0 KiB [ ] description
4,0 KiB [ ] HEAD
4,0 KiB [ ] COMMIT_EDITMSG
0,0 B [ ] FETCH_HEAD
- the .git/ folder on new used ~ 8b:
-- /home/bcu/work/interamc/remove/rocsimulateur/.git -------------------------------------------------------------------------------------------------------------------------------------------------------------
7,4 MiB [##########] /objects
68,0 KiB [ ] index
52,0 KiB [ ] /hooks
36,0 KiB [ ] /logs
32,0 KiB [ ] /refs
8,0 KiB [ ] /info
e 4,0 KiB [ ] /branches
4,0 KiB [ ] config
4,0 KiB [ ] packed-refs
4,0 KiB [ ] description
4,0 KiB [ ] COMMIT_EDITMSG
4,0 KiB [ ] HEAD
- the original spend more time than new (x4) to perform git fetch command (~ 4 to 5 min)
- the git fetch command failed when the command exceeds 5 minutes
I have tried to set GIT_STRATEGY
to clone but the problem persist.
I have tried to set GIT_DEPTH
to 3 but the problem persist.
I execute my runner on kubernetes.
Some information:
- kubernetes version:
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.7", GitCommit:"8fca2ec50a6133511b771a11559e24191b1aa2b4", GitTreeState:"clean", BuildDate:"2019-09-18T14:39:02Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
- gitlab runner image:
gitlab/gitlab-runner:alpine-v12.2.0
- Gitlab CE version:
11.7.0
Thanks for your help !