resource_group prevents jobs in the same pipeline stage from running simultaneously
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
According to the documentation for resource_groups
https://docs.gitlab.com/ee/ci/yaml/#resource_group
When the resource_group key is defined for a job in .gitlab-ci.yml, job executions are mutually exclusive across different pipelines for the same project. If multiple jobs belonging to the same resource group are enqueued simultaneously, only one of the jobs will be picked by the Runner, and the other jobs will wait until the resource_group is free.
But if two jobs have the same resource group assigned in the same pipeline stage, they will also be prevented from being enqueued simultaneously.
We would like to use resource_groups to prevent two pipelines from running simultaneously for gitlab.com deployments. I'm not sure how this can be done if we have multiple jobs running in parallel across multiple stages in a single pipeline, we could pick one job in each stage, but to do that we would need to identify the longest running job in each stage.
Example: