Is there support for throttling concurrent jobs?

I’m curious if GitLab CI has a throttling feature, in the style of Throttle Concurrent Builds.
Let’s think about one or more unique resource[s] (printer, test device, etc ). So if this resource is busy right now, we need to add a job to a queue.

Are you perhaps looking for the concurrent runner setting?

concurrent Limits how many jobs can run concurrently, across all registered runners. Each [[runners]] section can define its own limit, but this value sets a maximum for all of those values combined. For example, a value of 10 means no more than 10 jobs can run concurrently. 0 is forbidden. If you use this value, the runner process exits with a critical error. View how this setting works with the Docker Machine executor (for autoscaling).

1 Like

@thiagocsf - Thank you, but I’m looking for something else.
I’m looking for a solution for this scenario: I have certain resource which allows only X simultaneous users (Example: I have only 3 smartphones for running tests, or a website that allows 5 sessions). So I need to throttle jobs (workflows, steps) which use this resource - allow to run only X instances in the same time, the rest jobs should wait.
You can see Jenkins Throttle Concurrent Builds plugin for more details.

oh, I understand now, @vitalykarasik.

I suspect you could achieve the same goal with a mix of runner tags and the concurrent setting.

For example, add a runner configure to pick android tags, and limit it to the number of android devices attached to it via the concurrent setting.