Run a specific shared runner docker image without having to specify tags
First of all, my apologies if this is already possible, I did some googling and checked the documentation here and here but couldn't find anything related to this issue.
Description
Currently we're specifying image: xxx
at the top of our .gitlab-ci.yml
file, and setting it to the name of the docker image we want to use, where that docker image is registered as a shared runner. This meets all our requirements (see below), except it doesn't work exactly as intended, because it first loads up a random shared runner, and then fires up our docker image from inside there (as a nested docker instance). This increases the chance of builds failing when the first randomly selected runner is broken somehow, and it also increases build time and confusion.
Proposal
I propose that when an image:
is specified in the yml file which is a shared runner, it should be loaded directly instead of as a nested instance.
Background / Requirements
- We're running gitlab runner inside our private network with a private repository of docker images.
- We use the runner as a kind of build server, and the docker image uses the target OS version to be used in production for that project
- Due to above, it's critical that we be able to specify a given docker image on a project-by-project basis
- We don't want to use tags as we know which image we want, and we don't want our build to fail when another runner is created with the same tags
- We tend to have several jobs in each project, and they all use the same image, so we'd like to avoid duplicating the image for each job
- We'd like to share the images across multiple groups, as some configurations are common across multiple projects, so we use shared runners