Gitlab Runner
Private repositories in c2projects cannot use shared runners from gitlab.com. Add node c2d-gitlab-runner
to ansible project that can be used as a Gitlab Runner.
Gitlab.com describes two ways to install Gitlab runner. Package or bash commands. The third option is Ansible.
- One is to use a package official Gitlab repositories. See Install GitLab Runner using the official GitLab repositories | GitLab
- The other option is to install using a few commands. This installation option is suggested when getting a registration token. Commands are shown below.
- In this Ansible project, the recommended choice is to utilize the robertdobock.gitlab_runner Ansible Role, which can be found on the Ansible Galaxy website.
sudo curl -L --output /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
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start
sudo su - gitlab-runner
gitlab-runner register --url https://gitlab.com/ --registration-token GR1348941xY_zs5BsnbrqsWxozMv6
324 335
Edited by onknows