How to get GitLab runners to run in parrallel, but not multiple jobs per runner

84 Views Asked by At

We have 6 repos in a self-hosted GitLab 15 server. We have a separate runner box and 6 named/tagged runners setup. So each repo on gitlab has its own specific runner.

What we want to happen is that each runner can run independently, not held up by other runners executing jobs.

However, we do not want any one runner to execute more than one job at a time.

So repo #1 can only run one job at a time Same with repo #2 etc...

However, repo #1 can run a job, and repo #2 can run a job both at the same time, and not wait for the other to complete before starting.

We have tried all combinations of concurrent=x and limit=y, as global and per runner without success.

1

There are 1 best solutions below

0
towel On

Other than setting up additional runners with limit = 1 in the config.toml and a tag of their own I cannot think of another option. (Using a resource_group can only throttle access to a step on the instance level, so I'm afraid there is no bulitin solution for this in GitLab.)