.net core 自动部署 gitlab-runner CI CD入门
1.准备工作
1.准备2台linux CentOS-7虚拟机
2.本文演示虚拟机IP 192.168.33.100和192.168.33.101
3.33.100机器上安装gitlab-runner和.net core SDK用来做CI CD
4.33.101机器安装.net core SDK和Supervisor守护进程模拟测试服务器
2.配置gitlab-ruuner
1.下载gitlab-ruuner
# Linux x86-64
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
# Linux x86
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386
# Linux arm
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm
2.赋予权限
sudo chmod +x /usr/local/bin/gitlab-runner
3.创建GitLab CI用户
sudo useradd --comment '