Pending the second branch until the first ended

Hi guys!

We have a local Gitlab at my company and we have a big project on which several people work at same time. The problem is sometimes people want to run his own branches pipeline at a same time.
I want to achieve if people 1 start her own branch pipelines the people 2 pipeline stay in pending state until the first branch pipeline ends. Have any Gitlab feature for this or i need to solve this eg. with bash script, which check every x second with gitlab api that have any running job?

If you want to second branch’s pipeline wait until the first branch’s pipeline completes, you can set

concurrent = 1

in your runner’s config.toml file.

There is a good explanation in Maximize your gitlab-runner power with CI/CD concurrent pipelines | by Bao Huynh | FAUN — Developer Community 🐾