Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab Runner - How to allow only one Pipeline run at a time

I am new to GitLab and facing a problem where if I trigger two pipelines at the same time on same gitlab-runner, they both run in parallel and results in failure. What I want is to limit the run to one pipeline at a time and others in queue.

I have set the concurrent = 1 in config.toml and restarted the runner but it didn't help. My ultimate goal is to prevent multi-pipeline run on the runner.

Thanks.

like image 554
Shubh Rocks Goel Avatar asked Nov 15 '22 14:11

Shubh Rocks Goel


1 Answers

Set resource_group in the Job, and give a unique name for all other tasks that should be blocked.

Example from the documentation:

deploy-to-production:
  script: deploy
  resource_group: production
like image 71
phihag Avatar answered Mar 17 '23 04:03

phihag