搭建gitlab runner
1、搭建runner
镜像:gitlab/gitlab-runner:latest
2、注册runner,输入gitlab-runner register
命令
root@runner-6f49c57c49-5889v:/# gitlab-runner register
Runtime platform arch=amd64 os=linux pid=1054 revision=81ab07f6 version=16.10.0
Running in system-mode.
Enter the GitLab instance URL (for example, https://gitlab.com/):
https://gitlab-XXX.com.cn/ ### 输入gitlab地址
Enter the registration token:
GR1348941szPTgrFCXXXXXXXXXX ### 输入token,具体如图一
Enter a description for the runner:
[runner-6f49c57c49-5889v]: k8s-runner-cody ### description
Enter tags for the runner (comma-separated):
k8s-runner-cody ### tags 名
Enter optional maintenance note for the runner:
k8s-runner-cody
WARNING: Support for registration tokens and runner parameters in the 'register' command has been deprecated in GitLab Runner 15.6 and will be replaced with support for authentication tokens. For more information, see https://docs.gitlab.com/ee/ci/runners/new_creation_workflow
Registering runner... succeeded runner=GR1348941szPTgrFC
Enter an executor: docker, docker-windows, docker-autoscaler, ssh, shell, parallels, virtualbox, docker+machine, kubernetes, instance, custom:
shell ### 填shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml"
图一:
如果出现报错:tls: failed to verify certificate: x509: certificate signed by unknown authority
,需要将证书加到/usr/local/share/ca-certificates/
目录下,再执行update-ca-certificates
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?