0
votes

I've failed on running job by gitlab-runner using shell-executor.My setup is one server(centos6), with Gitlab installed, and the same server has the runners installed and configured.

Gitlab v11.8.0-ee

My project has a very simple yaml config file:

dev:
 script:
 - pwd

when running a job,I get the following output:

[0KRunning with gitlab-runner 11.8.0 (4745a6f3)
[0;m[0K  on holiday zs7axHmm
[0;m[0KUsing Shell executor...
[0;msection_start:1551421397:prepare_script
[0KRunning on host-192-168-200-85...
section_end:1551421397:prepare_script
[0Ksection_start:1551421397:get_sources
[0K[32;1mFetching changes...[0;m
HEAD is now at ba9b6da Add new file
[32;1mChecking out ba9b6dac as master...[0;m
[32;1mSkipping Git submodules setup[0;m
section_end:1551421398:get_sources
[0Ksection_start:1551421398:restore_cache
[0Ksection_end:1551421398:restore_cache
[0Ksection_start:1551421398:download_artifacts
[0Ksection_end:1551421398:download_artifacts
[0Ksection_start:1551421398:build_script
[0K[32;1m$ # Auto DevOps variables and functions # collapsed multi-line command[0;m
[32;1m$ setup_docker[0;m
[32;1m$ build[0;m
Logging to GitLab Container Registry with CI credentials...
bash: line 91: docker: command not found
section_end:1551421398:build_script
[0Ksection_start:1551421398:after_script
[0Ksection_end:1551421398:after_script
[0Ksection_start:1551421398:upload_artifacts_on_failure
[0Ksection_end:1551421398:upload_artifacts_on_failure
[0K[31;1mERROR: Job failed: exit status 1
[0;m`

I disabled shared runner for this project.but still job fails with docker error.

1
Are you sure that the ci runs your configuration? It looks like the auto devops feature. Make sure that your gitlab ci yml file is valid and in the correct place - Amityo
thank you for your hint.I check my gitlab-ci.yml file again and I found that the file name dosen't start with ".",I change my file name .gitlab-ci.yml and all jobs run seccessfully!:) - user3478624
Excellent. Please add an answer and set it as the correct one. - Amityo

1 Answers

0
votes

because project has gitlab-ci.yml instead of .gitlab-ci.yml ,gitlab-runner skip my config file and use default config that run docker command while I set executor to shell.the file name is very important and because my file name dosen't start with "." ,gitlab-runner ignore my config.