Gitlab-runner configuration

As I wrote in the previous entry , I updated gitlab and was going to configure ci. I decided to start with the standard gitlab-runner . Installed gitlab-runner, created docker image based on FROM ros: kinetic-ros -base-xenial using the dockerfile . Configured config.toml to work with the docker, registered test commands in .gitlab-ci.yml for the project. And tried to run:

 ...
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@ci-host/project-group/project.git/': Failed to connect to ci-host port 80: Operation timed out
ERROR: Job failed: exit code 1

Ok, specified extra-hosts=[“ci-host: 12.89.123.456”], as here in comments or here . Then i got:

 ...
ERROR: Job failed: error response from daemon: repository my_image_name not found: does not exist or no pull access

Added pull_policy = “if-not-present” to toml. Now gitlab will download only images that will not find locally. By the way, here’s all options . Further:

GitLab CI runner can not connect to unix:///var/run/docker.sock in
ERROR: Job failed (system failure): Can not connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I stumbled, looked that there with the docker service docker status . Noted much /proc/self/exe init and error:

docker: Error response from daemon: containerd: container did not start before the specified timeout.

The last two errors are rather abstract, there are many reasons. I tried to start the container with my hands (via docker run) – the same nonsense. In my case, in the end (most likely) server simply lacked operation memory . Added, rebooted – everything is ok.
Another useful point – if you call sh in script in .gitlab-ci.yml, then put set -e , otherwise it will return only the last command result. Those, if you call several tests, gitlab will only show the result of the last one:

 ...
ImportError: No module named ...
FAILED (errors = 1)
...
 * RESULT: SUCCESS
...
Job succeeded

1
Add comment

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
Recent comment authors
newest oldest most voted
trackback

[…] я писал про проблемы при настройке gitlab-ci на основе gitlab-runner, а конечные удачные настройки не показал. Вот они: […]