gitlab–基础–4.3–CICD–runner–注册
1、注册一个实例runner(共享的runner)
1.1、命令
# 注意,我这加入82端口
sudo gitlab-runner register --url http://192.168.187.171:82/ --registration-token Ex2y_NL8oy4xyxmas6q_
接下来会提示你输入一系列配置内容
## 输入 GitLab的url
Enter the GitLab instance URL (for example, https://gitlab.com/):
[http://192.168.187.171:82/]:
## 输入registration 的token
Enter the registration token
[Ex2y_NL8oy4xyxmas6q_]:
## 写个描述,我这里直接enter,没有写
Enter a description for the runner:
## 这个tag很重要,好好想个名字并记住,随后在ci配置中需要对应上。
# 我这里直接enter,没有写
Enter tags for the runner (comma-separated):
## 输入可选维护说明
# 我这里直接enter,没有写
Enter optional maintenance note for the runner:
## 选择一个执行器。
# 我输入shell。
Enter an executor: shell, ssh, virtualbox, docker-ssh+machine, custom, docker-ssh, parallels, docker, docker+machine, kubernetes:
shell
1.2、查看runner
2、注册群组runner(给指定群组使用的)
3、给项目注册一个runner
4、docker 安装的 gitlab-runner的注册方法
# 进入容器
docker exec -it gitlab-runner bash
# 注册
gitlab-runner register --url http://192.168.187.171:6688/ --registration-token Ex2y_NL8oy4xyxmas6q_