I have a gitlab runner on a machine. i used the "docker" option to run gitlab runner, meaning i run it as a docker and it starts with the PC until i stopped and remove it.
I registered 3 runners in the toml inside the docker. The runners are running nicely on my CI. The issue i'm experiencing is that even though all the instances are from the same docker so they "share" a machine, the cache seems to be different, meaning two runners from the same docker don't have the same cache directory.
This means that a single CI project using 2 runners cannot share cached data. what i know i can do:
- use "tags" to have a single runner on the CI job (don't want to).
- use short lived artifacts and "depends" to have files and env variables shared between jobs - then why the hell do i have cache for ???
- create another docker with S3 like service and publish the details in the CI but limiting me to the same machine as i'm not exposing the service.
what i'm not sure or don't know how to do: create a script that runs before each runners starts (defined in the toml) that will copy cache if exists from dir to dir or will grab a cache from a shared directory OR define somehow in the toml a shared local dir for cache.
Anybody did this ?
As requested below, i'm adding my gitlab-ci.yml: https://paste.ubuntu.com/p/NxgyyjGTq6/