In our Gitlab project group, we are using multiple shared runners for CI. However, some of the jobs have dependencies, such that the previous job must have been executed on the same runner.
Here is an Example:
- Job 1 builds a docker container
- Job 2 checks the docker for execution, so it needs the docker image from job 1
- Job 3 pushes the docker image to a container hub, so it needs the docker image from job 1
Now, with multiple shared runners it may happen, that job1 is executed on runner 1 and job 2 and 3 on a different runner than runner 1. This throws an error in job 2 and 3 as the docker image is locally not available on that runner.
On the other hand, we need multiple runners due to the amount of computation in our project. So it would be great if once a runner is picked in a specific job, it keeps the same runner for the ongoing jobs.
Any ideas to solve this?