我自己用的 Centos 7 x64 ,一下流程都是以 Centos 7 x64 roor权限为基础的
安装
1 | curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash |
使用
1. 注册runner
1 | # register |
这里遇到了个坑,不添加
--executor会报错running register from command line,–executor Xresults in:ERROR: Invalid executor specified``
但是官方文档里却没有说必须要加
2. 启动服务
1 | # 安装服务 |
3. 配置runner tag
先说一下 Specific Runners 。
这个tag配置是用来 标识 该 runner 的。
进入[Settings -> CI/CD -> Specific Runners] ,点击编辑按钮(这个按钮我是找了好久才找到),添加一个tag,在job中可以通过指定tags来定位到对应的 Runner


关于 jobs 这里有几篇很不错的文章,我就不多赘述了。