获取Runner-token
- 开始注册
- 查看
- 默认交互模式下使用,非交互模式添加 --non-interactive
[root@iZ2zeflzb6atg5mhyyxn7oZ ~]# gitlab-runner register Runtime platform arch=amd64 os=linux pid=27277 revision=4c96e5ad version=12.9.0 Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
- 此命令列出了保存在配置文件中的所有运行程序
[root@iZ2zeflzb6atg5mhyyxn7oZ ~]# gitlab-runner list Runtime platform arch=amd64 os=linux pid=27509 revision=4c96e5ad version=12.9.0 Listing configured runners ConfigFile=/etc/gitlab-runner/config.toml buildtest Executor=shell Token=yesXwM5VEEDkCQxGLuwa URL=http://lucky.xiaoxin.tech/
- 此命令检查注册的runner是否可以连接,但不验证GitLab服务是否正在使用runner。 --delete 删
[root@iZ2zeflzb6atg5mhyyxn7oZ ~]# gitlab-runner verify Runtime platform arch=amd64 os=linux pid=27604 revision=4c96e5ad version=12.9.0 Running in system-mode. Verifying runner... is alive runner=yesXwM5V
- 使用令牌注销
gitlab-runner unregister --url http://gitlab.example.com/ --token t0k3n
- 使用名称注销(同名删除第一个)
gitlab-runner unregister --name test-runner
- 注销所有
gitlab-runner unregister --all-runners
服务管理
该命令停止运行并从服务中卸载GitLab Runner
gitlab-runner uninstall
该命令启动GitLab Runner服务
gitlab-runner start
该命令停止GitLab Runner服务
gitlab-runner stop
该命令将停止,然后启动GitLab Runner服务
gitlab-runner restart
此命令显示GitLab Runner服务的状态。当服务正在运行时,退出代码为零;而当服务未运行时,退出代码为非零。
gitlab-runner status
注册多个标签
[root@iZ2zeflzb6atg5mhyyxn7oZ ~]# gitlab-runner register Runtime platform arch=amd64 os=linux pid=5931 revision=4c96e5ad version=12.9.0 Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): http://lucky.xiaoxin.tech/ ####访问地址 Please enter the gitlab-ci token for this runner: Xq9ELg9MUuSC8nH39yth ####共享token Please enter the gitlab-ci description for this runner: [iZ2zeflzb6atg5mhyyxn7oZ]: builddeploy ####描述信息 Please enter the gitlab-ci tags for this runner (comma separated): build,deploy #####标签 Registering runner... succeeded runner=Xq9ELg9M Please enter the executor: docker-ssh, docker+machine, kubernetes, custom, docker, parallels, shell, ssh, virtualbox, docker-ssh+machine: shell ####执行器 Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
继续阅读
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论