gitlab-runner exec: easily test builds locally
I just pushed a brand new feature to GitLab Runner:
It allows you to run the jobs defined in
In turn, this allows for faster testing cycles, and it makes it easier to fix broken builds.
The command supports any executor and supports all
How to use it
- Install Bleeding Edge Runner release locally.
- Run the build:
gitlab-runner exec docker my-job.
This will run
my-job defined in the local
.gitlab-ci.yml in a docker container.
exec with Docker
- Create a new docker VM:
docker-machine create -d virtualbox runner
- Configure shell:
eval $(docker-machine env runner)
- Some environment variables are not accurate: CI_BUILD_ID, CI_PROJECT_ID, etc.
Let me know what do you think about it.