We have a docker image that all of our jobs use to execute the gitlab CI jobs. There are two things we’re struggling to accomplish that are probably related.
- we have a tool baked in to the runner image that we would like to have it update (git clone & python setup) upon startup of the runner
- we’d like to source some scripts in for the jobs to use
I’d rather have this automatic and something the image does on startup, vs something every job needs to do.
we attempted to mess around with the entrypoint and overriding the entrypoint etc without much luck. From the docs it looks like we should be able to create our own entrypoint that should be used for the jobs, but it seems like its just overriding and using sh.
In order to use source, we need bash and i saw some stuff about overriding sh with a link to bash, and then using a bashrc file to update/source in what we need, but this also doesnt work.
Has anyone done something like this? and if so can you provide some pointers on how we can accomplish this?
gitlab EE version 13.12.8
Docker executors with docker version 20.10.7 build f0df350