GitLab Runner 安装和配置

安装环境 Ubuntu 20.04.6 LTS

1. 添加仓库 

curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash

2. 使用apt安装

sudo apt-get install gitlab-runner

 3. 注册runner

打开gitlab-settings-CI/CD,展开Runners选项

GitLab Runner 安装和配置_第1张图片

 在runner端运行,按提示填写url和token,executor选择shell

sudo gitlab-runner register

 4. 重启runner

sudo gitlab-runner restart

GitLab Runner 安装和配置_第2张图片

返回gitlab可查看到已经注册的runner

你可能感兴趣的:(gitlab)