然后执行下面的命令注册runner
[root@localhost ~]# gitlab-ci-multi-runner register
Runtime platform arch=amd64 os=linux pid=4387 revision=98daeee0 version=14.7.0
Running in system-mode.
Enter the GitLab instance URL (for example, https://gitlab.com/):
输入注册地址
Enter the registration token:
输入注册令牌
Enter a description for the runner:
[localhost.localdomain]: 描述,可以随便写
Enter tags for the runner (comma-separated):
标签 与 .gitlab-ci.yml文件中的tags对应
Registering runner... succeeded runner=2aZHpdoN
Enter an executor: kubernetes, custom, ssh, virtualbox, docker+machine, docker-ssh+machine, docker, docker-ssh, parallels, shell:
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-ci-multi-runner list
Runtime platform arch=amd64 os=linux pid=5062 revision=98daeee0 version=14.7.0
Listing configured runners ConfigFile=/etc/gitlab-runner/config.toml
node-build Executor=shell Token=注册令牌 URL=注册地址