-
Create an account at https://gitlab.com
-
Create a new empty project
-
Add a file named
.gitlab-ci.yml
-
This complex pipeline to check the system:
test:
script: echo "Holi!"
- Control your frustration
-
Go to
settings -> CI/CD
-
Expand the
Runners
tab -
Disable
Enable shared runners for this project
-
Click on
New project runner
-
Select
Linux
-
Add
dind
as the tag -
Check
Run untagged jobs
(very important) -
Press
Create runner
-
Copy the token to the clipboard
-
Go to https://labs.play-with-docker.com and sign in
-
Create a new instance
-
Type this to define a
volume
docker volume create gitlab-runner-config
- Run the CI/CD agent
docker run -d --name gitlab-runner \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v gitlab-runner-config:/etc/gitlab-runner \
gitlab/gitlab-runner:latest
- Start the configuration process
docker run --rm -it \
-v gitlab-runner-config:/etc/gitlab-runner \
gitlab/gitlab-runner:latest register
-
Type
https://gitlab.com
as the GitLab instance -
Paste the token from the clipboard
-
Run again the pipeline
-
Big success!