gitlab-runner注册执行器

gitlab-runner注册执行器

  1. 打开gitlab上的项目页,Settings->CI/CD->Runners->create project runner
    创建好后会生成registration token,后面会用
  2. 下载gitlab-runner 并保存到目录文件夹下,重命名为gitlab-runner.exe
    下载地址:https://docs.gitlab.com/runner/install/bleeding-edge/#download-the-binary
    比如https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/main/binaries/gitlab-runner-windows-amd64.exe
  3. 以管理员运行powershell
  4. cd 到项目目录下
  5. 执行
bash 复制代码
.\gitlab-runner register
bash 复制代码
Enter the GitLab instance URL (for example, https://gitlab.com/):
https://gitlab.com/
Enter the registration token:
GR...
Enter a description for the runner:
[CHINAMI-ULH9Q72]: my-windows-runner
Enter tags for the runner (comma-separated):
windows
Enter optional maintenance note for the runner:
runner
...省略输出
ssh, docker+machine, docker-autoscaler:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

注册成功后,会在当前目录生成一个 config.toml 文件,如果存在,说明注册信息已保存。

6.启动 Runner

a.方式1

bash 复制代码
.\gitlab-runner.exe run

此时刷新 GitLab 页面,"Runner has never contacted..." 会消失,状态变为绿色 ●(在线)。

⚠️ 缺点:关闭 PowerShell 窗口,Runner 就停止了。

b.方式2

bash 复制代码
cd D:\workspace\auto_pull

# 安装服务(使用当前用户权限)
.\gitlab-runner.exe install --user ".\CHINAMI-ULH9Q72" --password ""

# 启动服务
.\gitlab-runner.exe start
相关推荐
酿情师1 天前
Gitlab 任意文件读取漏洞(CVE-2016-9086)
gitlab
糖果罐子♡2 天前
TortoiseGit 首次上传本地工程至已初始化的GitLab仓库教程
gitlab
Byron Loong2 天前
【Git】如何检查 Ubuntu 系统上 gitLab 是否开启
git·ubuntu·gitlab
QN1幻化引擎3 天前
SFA 信号场注意力:用8KB参数换248x KV Cache压缩,边缘设备也能跑长序列
人工智能·算法·gitee·gitlab
阿里云云原生3 天前
研发福音:云效 AI 智能评审正式支持 GitLab 集成,VPC 内网即可实现自动审阅
gitlab
这个需求做不了6 天前
Jenkins自动化构建与CI/CD流水线,并配置GitLab
java·ci/cd·自动化·gitlab·jenkins
qq_452396237 天前
第六篇:《GitLab CI 进阶:多环境部署与环境变量管理》
git·ci/cd·gitlab
考虑考虑8 天前
git中的tag
git·gitlab·github
Skilce10 天前
基于GitLab CI/CD + Kubernetes的自动化部署平台搭建
ci/cd·kubernetes·gitlab
行者-全栈开发10 天前
Jenkins 与 GitLab 深度集成实战:从 Webhook 到 Merge Request 全流程自动化
gitlab·jenkins·webhook·merge request·multibranch·source plugin·ci/cd 自动化