Simple setup for a Gitlab Runner bare metal on Debian
- Clone the repo
cd /opt
git clone git@github.com:sylvain-reynaud/gitlab-runner-debian-setup.git
- Run setup.sh as
root
./setup.sh
- Go to your Gitlab project, you must be the master.
- Get the registration token (Your project > Settings > CI/CD > Runner)
- Register the runner as
root
export REGISTRATION_TOKEN=...
export GITLAB_URL=https://.../
gitlab-runner register --url $GITLAB_URL --registration-token $REGISTRATION_TOKEN
- Choose
docker
ordocker+machine
, it depends of the needs. - Edit your runner (Your project > Settings > CI/CD > Runner)
- Untick
Lock to current projects