Gitlab-runner安装

简介

从gitlab8.0开始,GitlabCI就默认被开启并支持所有项目。这样我们就可以利用这个功能实现持续集成。

获取runner token

浏览器输入http://xxx/admin/runners

安装runner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash
sudo yum install gitlab-ci-multi-runner
sudo gitlab-ci-multi-runner register

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
https://gitlab.com
Please enter the gitlab-ci token for this runner
xxx
Please enter the gitlab-ci description for this runner
first_runner
INFO[0034] fcf5c619 Registering runner... succeeded
Please enter the executor: shell, docker, docker-ssh, ssh?
shell
INFO[0037] Runner registered successfully. Feel free to start it, but if it's
running already the config should be automatically reloaded!

安装成功

安装成功之后页面会显示在线的runner

参考

https://docs.gitlab.com/ce/ci/runners/README.html

坚持原创技术分享,您的支持将鼓励我继续创作!