Skip to content

Instantly share code, notes, and snippets.

@nietzscheson
Created July 8, 2022 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nietzscheson/b8b3d5e2fce60246e40b43345df7d5ff to your computer and use it in GitHub Desktop.
Save nietzscheson/b8b3d5e2fce60246e40b43345df7d5ff to your computer and use it in GitHub Desktop.
Gitlab Locally Test Runner
### .gitlab-ci.yml
image: alpine
test:
script:
- echo "Hello Gitlab-Runner"
### Pull Gitlab Runner image
docker run -d \
--name gitlab-runner \
--restart always \
-v $PWD:$PWD \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
### Execute the step
docker exec -it -w $PWD gitlab-runner gitlab-runner exec docker <put_here_step_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment