Running GitLab Multiple CI jobs always fail because they work under same directory
Our CI pipeline fails if multiple builds start at the same time. It is because multiple runners use the same git repository and try to change the files being used by other runner.
We have GitLab Community Edition 12.10.11 running in a Docker (Docker Client Version: 17.05.0-ce and Server Version: 17.05.0-ce on Ubuntu 16.04) We have a GitLab runner 12.10.2 running on another machine in a Docker container with following platform info: Platform linux Architecture amd64
In order to stop GitLab runners to use the same directory while checkout we did tried to change the runners configurations to not run in parallel. Here are our configurations:
- Changing or removing line oncurrent = ? line have no effects as it will continue executing multiple pipelines in parallel
- Setting MaxBuilds = 1 also does not do anything.
- Setting limit = 1 also does not do anything.
Here is how our config.toml looks like:
/srv/gitlab-runner/config/config.toml
# concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "dind on prism"
url = "https://example.com/"
token = "HoolaHello"
executor = "docker"
limit = 1
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.docker]
tls_verify = false
image = "docker:stable"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.machine]
MaxBuilds = 1