Skip to content

Instantly share code, notes, and snippets.

@cvno
Created June 19, 2019 06:18
Show Gist options
  • Save cvno/2d32c5be152509328e95e926956514be to your computer and use it in GitHub Desktop.
Save cvno/2d32c5be152509328e95e926956514be to your computer and use it in GitHub Desktop.
#/bin/sh
# USE ROOT RUN
# install gitlab runner
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
sudo chmod +x /usr/local/bin/gitlab-runner
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
# add gitlab-runner to docker group
sudo gpasswd -a gitlab-runner docker
gitlab-runner start
sudo systemctl enable gitlab-runner
# register runner
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
--registration-token "8iS1b7Busv8d7RJSytH6" \
--executor "shell" \
--description "oem-df xxmt, Do not use it at will!!!" \
--tag-list "oem-df,xxmt" \
--run-untagged="true" \
--locked="false" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment