一套完整的gitlab+gitlab-runner自动化项目项目部署

1.安装并配置必要的依赖关系

sudo apt-get install -y curl openssh-server ca-certificates

添加 GitLab 镜像源并安装

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo EXTERNAL_URL=”http://192.168.33.11″ apt-get install gitlab-ce

配置并启动 GitLab

sudo gitlab-ctl reconfigure

管理gitlab服务器

gitlab-ctl stop|start|restart

搭建gitlab-runner

安装并配置必要的依赖关系

sudo apt-get install -y curl openssh-server ca-certificates

添加GitLab的官方存储库

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

安装gitlab-runner

sudo apt-get install gitlab-runner

注册gitlab-runner

sudo gitlab-runner register

安装gitlab-ci-multi-runner

$ curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash
$ sudo apt-get install gitlab-ci-multi-runner

参考

https://blog.csdn.net/weixin_40660335/article/details/78552094