How to prevent the same runner from picking up two CI jobs at the same time


I’ve configured 26 custom runners for a project I’m working on. At the moment, in my config.toml file for the runners, I have concurrent = 26. However, I want to introduce a new job that, due to its nature, should only ever be run one at a time, even if there are multiple pipelines waiting on that job and multiple available runners. In order to achieve this, I set up a runner with a specific tag and set that job to have that specific tag, hoping that that would solve the problem. I tested this by running two pipelines at the same time, but I noticed that that job is getting picked up and run by the same tagged runner in both pipelines and is seemingly executing the two jobs concurrently. Maybe I misunderstand how runners work, but isn’t one runner supposed to only be able to run one job at a time? If not, how can I achieve the desired behavior of having only one instance of job X allowed to run at a time across all pipelines?

This might do what you need: Resource group | GitLab