Linux

gitlab runner 설치

CHOMAN 2019. 7. 30. 17:00

참고 원문 링크

https://docs.gitlab.com/runner/install/linux-repository.html
    1. 21 centos8 공식 runner 는 없는 상태

테스트 환경 Centos7

다운 & 설치

curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
yum install gitlab-runner

버젼 선택하여서 설치 (아래 참고)

yum list gitlab-runner --showduplicates | sort -r
sudo yum install gitlab-runner-10.0.0-1

runner 업데이트 하는 경우 (아래 참고)

yum update
yum install gitlab-runner

runner 등록하기

[root@localhost ~]# gitlab-runner register
Runtime platform                                    arch=amd64 os=linux pid=27114 revision=de7731dd version=12.1.0
Running in system-mode.                            

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://도메인/ (입력)
Please enter the gitlab-ci token for this runner:
토큰문자열 (입력)
Please enter the gitlab-ci description for this runner:
[localhost.localdomain]: takakocap (입력)
Please enter the gitlab-ci tags for this runner (comma separated):
takakocap-tags (입력)
Registering runner... succeeded                     runner=VsfN5zYz
Please enter the executor: virtualbox, docker+machine, docker-ssh+machine, custom, docker, ssh, kubernetes, docker-ssh, parallels, shell:
shell (입력)
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 
[root@localhost ~]#

gitlab - runner

  • 위 도메인과 토큰 문자열 값은 gitlab 관리자 페이지 - 설정 - CI / CD 쪽에 보면 나와 있음

gitlab 에서 삭제된 runner 제거하기 (runner 에서 실행)

0 1 * * * root gitlab-runner verify --delete