I’m working on a runner on my local machine with some options I’ve never used before. What’s the best way to test that it works? Should I register it with our live Gitlab instance? (I’d rather not have to push a change to a repo every time, but I guess that’s not a deal breaker.) Or is there something available that would locally mock the endpoints that the runner uses to get jobs, source, artifacts, etc.?
I had some early success with gitlab-runner exec
, but wasn’t able to get it working when running the Runner itself in Docker and using the Docker executor. I believe the problem had to do with getting the executor to see the volume mount that had the git repo for the job I was asking to exec, but I didn’t dig too deep.
For more context, I’m using Docker Compose to run the runner (as in this example) along with a service that I need to be persistently available on the same network as the jobs (we’re experimenting with Dagger, which might/should give better caching performance if the engine persists outside of a single job). There are probably other ways to do it, but this is the route I’m taking right now.