running the following commands in Git Bash on a Windows machine:
run
docker pull gitlab/gitlab-runner
: this pulls the Gitlab Runner image found on Docker Hub. it's managed by Gitlab themselvesrun this command:
docker run -d --name gitlab-runner --restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
it creates a container based on the Gitlab runner image we pulled in step one, and it mounts certain configuration files in the container to the local system volume so that they persist upon restart of the container (probably super useful if i'm running the container on my local machine, since i'll be turning that computer on and off a lot)
- run this command to register the runner:
winpty docker run --rm -it -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register
original instructions on Gitlab docs don't have the
winpty
, i added it after Git Bash told me it wasn't a TTY and that I should try adding itwhat i passed to the interactive CLI:
gitlab instance url (found under
Settings > CI/CD > Runners
)registration token (also found under
Settings > CI/CD > Runners
)runner description (local docker container runner)
tags (debug, setup)
optional maintenance note (left blank by simply hitting Enter)
executor (docker)
default Docker image (gitlab/gitlab-runner:latest)
nicee
now let me try changing the runner of my branch to the new, dockerized runner i just set up
actually, i'm not sure if i can do that. let me try running the pipeline again and see if it can execute now that i have a runner setup - OH SHOOT IT'S RUNNING - nevermind, it's stuck still
ohhh this is enlightening: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#set-a-runner-to-run-untagged-jobs
runners only run on tagged jobs. mine was likeiy not tagged at all. maybe i can either
- tag a job with the tags i gave my runners
- set a runner so that it can be used for untagged jobs
i'm trying the 2nd option
from this post, seems like you specify the tag in the .gitlab-ci.yml
. pipelines will run on all runners with those tags
i tried adding the following code snippet to each of my jobs:
tags:
- debug
still gets stuck
ugh. at this point, i just wanna nuke everything and try anew.
gonna explore the Gitlab Runner docs to see what i can find
Top comments (0)