I have one gitlab runner configured for a single project. The issue that I am seeing is that the runner will not wait until the prior pipeline build finished, and instead does a checkout in the same directory as the prior pipeline job and stomps over everything. I have one pipeline job already running, and then another developer commits and thus another pipeline job is started. Why can’t I configure the pipeline not to run so that it doesn’t corrupt the already running workspace?
Here is the log from both of the jobs (only difference is the timestamp)
[0K] Running with gitlab-runner 12.6.0 (ac8e767a) [0K] on gitlab.xxxx.com rz8RmGp4 [0K] section_start:1578357551:prepare_executor [0K] Using Docker executor with image my-image-build ... [0K] Using locally found image version due to if-not-present pull policy [0K] Using docker image sha256:xxxxxxxxxx for my-image-build ... [0;msection_end:1578357553:prepare_executor [0Ksection_start:1578357553:prepare_script [0K] Running on runner-rz8RmGp4-project-23-concurrent-0 via gitlab.xxxx.com... section_end:1578357554:prepare_script [0K] section_start:1578357554:get_sources [0K[32;1mFetching changes with git depth set to 50...[0;m Initialized empty Git repository in /builds/my-project/.git/ <proceeds to checkout and stomp over the already running runner>
Main issue I see is that they both checkout to the same directory of
Initialized empty Git repository in /builds/my-project/.git/ which causes the problem. I think all subsequent pipeline builds are sharing the same container for some reason, when I would think that they should be using different containers so as to avoid this problem. What am I doing wrong here?
Here is a snippet of the gitlab yml file
image: my-docker-image stages: - build build-me: stage: build before_script: - <some stuff here> script: - bitbake my-image
I edited the gitlab runner .toml file and put a limit of 1 in the [[runners]] section to no avail.