当前位置: 首页 > news >正文

gitlab-runner安装部署CI/CD

手动安装

卸载旧版:

gitlab-runner --version
gitlab-runner stop
yum remove gitlab-runner

下载gitlab对应版本的runner

# https://docs.gitlab.com/runner/install/bleeding-edge.html#download-any-other-tagged-releasecurl -L --output /usr/bin/gitlab-runner "https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/latest/binaries/gitlab-runner-linux-amd64"
chmod +x /usr/local/bin/gitlab-runner

添加用户:

sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

增加权限:

vi /etc/sudoers

## Allow root to run any commands anywhere 
root    ALL=(ALL)       ALL
gitlab-runner  ALL=(ALL)  NOPASSWD:ALL
## Allows members of the 'sys' group to run networking, software, 

启动服务:

sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start

注册Runner

GitLab CI/CD +Shell脚本实现简单的自动代码部署+重新启动dotnet 服务 - srsly - 博客园 (cnblogs.com)

gitlab-runner register --url https://ywzcgit.kaixinxiyou.com/ --registration-token oLJywozixrWb721WLx1R

在这里插入图片描述
在这里插入图片描述

runner配置

concurrent = 5 # 同时运行
check_interval = 0[session_server]session_timeout = 1800[[runners]]name = "authAdminRunner"url = "https://ywzcgit.kaixinxiyou.com/"token = "yCPnSz6f9hxk1h5Dg2zE"executor = "shell"[runners.cache][[runners]]name = "AuthCenter"url = "https://ywzcgit.kaixinxiyou.com/"token = "f-1z2sShzjyZsfYMsoaa"executor = "shell"[runners.custom_build_dir][runners.cache][runners.cache.s3][runners.cache.gcs][runners.cache.azure]

参考文档:
Install GitLab Runner using the official GitLab repositories | GitLab

http://www.lryc.cn/news/395741.html

相关文章:

  • 数据分析案例-2024 年全电动汽车数据集可视化分析
  • H桥驱动器芯片详解
  • 哪个充电宝口碑比较好?怎么选充电宝?2024年口碑优秀充电宝推荐
  • Memcached 介绍与详解及在Java Spring Boot项目中的使用与集成
  • 淮北在选择SCADA系统时,哪些因素会影响其稳定性?
  • Linux: 命令行参数和环境变量究竟是什么?
  • 数学系C++ 类与对象 STL(九)
  • CSS技巧专栏:一日一例 2.纯CSS实现 多彩边框按钮特效
  • JCEF 在idea 开发 java 应用
  • 绝区伍--2024年AI发展路线图
  • C++:.front()函数作用
  • Linux系统备份工具TimeShift
  • Google重大更新--解读Android Auto认证4.3
  • scala基础
  • 小红书选品中心商家采集 小红书商家电话采集软件
  • JavaScript基础: JavaScript 数字类型
  • 【网络安全】漏洞挖掘之Spring Cloud注入漏洞
  • 面试官:MySQL死锁是什么,如何解决?
  • CSS原子化
  • 【Python的pip配置、程序运行、生成exe文件】
  • 神经网络习题
  • deepstream段错误
  • 《梦醒蝶飞:释放Excel函数与公式的力量》10.1.1函数简介
  • Bert 变种, T5模型
  • 技术赋能政务服务:VR导视与AI客服在政务大厅的创新应用
  • 大模型备案全网最详细流程【附附件】
  • 0090__【Git系列】merge和rebase的区别
  • 谈面向任务的多轮对话系统(TOD)
  • 汇凯金业:如何判断黄金的买入时机
  • tomcat 项目迁移,无法将项目作为服务service启动