gitlab-cicd持续部署-保姆式基础教学

本文提供了一篇保姆式的GitLab-CICD基础教程,涵盖了从安装GitLab CE、配置Linux环境、创建项目,到安装GitLab Runner、注册Runner,以及进行CICD测试演示的全过程。在CentOS 7.9环境下,详细讲解了如何设置阿里云镜像源、安装相关依赖、关闭防火墙和SELinux,以及如何进行持续集成和交付。
摘要由CSDN通过智能技术生成

gitlab-cicd持续部署-保姆式基础教学

gitlab-cicd 是一个强大的自动化技术,支持任意规模的构建与测试

  • 持续集成(CI) 由您开始。您在合并请求(MR)中共享新代码,并触发Pipeline。构建、测试和验证——极狐GitLab负责完成其余的工作。
  • 持续交付 (CD) 将您的辛勤努力付诸实践,通过结构化部署Pipeline将经过CI验证的代码移交给您的应用程序。

环境:
linux centos7.9

基本配置

安装阿里云镜像源

[root@gitlab-cicd ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
[root@gitlab-cicd ~]# yum clean all
[root@gitlab-cicd ~]# yum makecache

安装相关依赖

[root@gitlab-cicd ~]# yum -y install policycoreutils openssh-server openssh-clients postfix 
[root@gitlab-cicd ~]# yum -y install  policycoreutils-python
[root@gitlab-cicd ~]# systemctl enable sshd && systemctl start sshd
[root@gitlab-cicd ~]# systemctl enable postfix && systemctl start postfix

关闭防火墙以及selinux

[root@gitlab-cicd ~]# systemctl stop firewalld && systemctl disable firewalld
[root@gitlab-cicd ~]# setenforce 0
[root@gitlab-cicd ~]# sed -i s/SELINUX=enforcing/SELINUX=disabled/g

gitlab-ce安装与操作

下载gitlab-ce软件

清华源包

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.6.2-ce.0.el7.x86_64.rpm

packageCloud(快很多)

https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.5.6-ce.0.el7.x86_64.rpm/download.rpm

[root@gitlab-cicd ~]# wget  https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.5.6-ce.0.el7.x86_64.rpm/download.rpm

安装gitlab-ce

[root@gitlab-cicd ~]# rpm -ivh download.rpm
#或
[root@gitlab-cicd ~]
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值