Created
April 26, 2016 22:31
-
-
Save roberto-filho/a3c23025c61bca7dc298223c25763f8b to your computer and use it in GitHub Desktop.
Commands to use gitlab runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This one is to create a new runner with docker support | |
sudo sudo docker run -d --name runner --restart always \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /srv/gitlab-runner/config:/etc/gitlab-runner \ | |
gitlab/gitlab-runner:latest | |
# This one is to register a runner with services | |
sudo docker exec -it gitlab-runner gitlab-runner register \ | |
--url "https://gitlab.com/" \ | |
--registration-token "PROJECT_REGISTRATION_TOKEN" \ | |
--description "docker-ruby-2.1" \ | |
--executor "docker" \ | |
--docker-image maven:3.3.9-jdk-7 \ | |
--docker-postgres latest \ | |
--docker-mysql latest | |
# This command unregisters a runner | |
sudo docker exec -it gitlab-runner gitlab-runner unregister --url CI --token TOKEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment