Gitlab注册Runner
1.先启动Gitlab,然后登陆进去,找到项目设置界面
2.部署Runner
这里采用docker安装的方式,也可以采用其他方式安装
# 创建docker镜像使用的数据卷
{20-07-16 16:28}InternalServer:~ root# docker volume create gitlab-runner-config
gitlab-runner-config
# 拉取并运行docker镜像,运行容器并开始注册
{20-07-16 16:29}InternalServer:~ root# docker run -d -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest register
Runtime platform arch=amd64 os=linux pid=7 revision=6fbc7474 version=13.1.1
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): # 输入gitlab地址,上面图片中有
http://192.168.0.253:81/
Please enter the gitlab-ci token for this runner: # 输入gitlab上的token,上面图片中有
q86sGA5ekFseiyCNC2Ny
Please enter the gitlab-ci description for this runner: # 输入一段介绍
[f52d5d7d0252]: 192.168.0.253-gitlab
Please enter the gitlab-ci tags for this runner (comma separated): # 标签
tag
Registering runner... succeeded runner=q86sGA5e
Please enter the executor: custom, docker-ssh, shell, ssh, kubernetes, docker, parallels, virtualbox, docker+machine, docker-ssh+machine: # 输入命令执行方式
shell
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/runner/install/
官方注册地址:https://docs.gitlab.com/runner/register/