# 2021-01-07 #「GitLab CI/CI」- 概念及架构(学习笔记)

GitLabCI/CD是GitLab内置的软件开发工具,支持持续集成(CI)和持续交付/部署(CD)流程。通过GitLabRunner和不同类型的Executor,如SSH和Docker,来执行构建任务。使用流程包括:管理权限用户在主机上运行gitlab-runner并注册executor,然后在项目仓库中配置.gitlab.yml文件定义构建流程。提交代码后,GitLab会自动触发流水线执行。

GitLab CI/CD

GitLab CI/CD is a tool built into GitLab for software development through the continuous methodologies:
Continuous Integration (CI)
Continuous Delivery (CD)
Continuous Deployment (CD)

GitLab Runner

GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.

Executors

GitLab Runner implements a number of executors that can be used to run your builds in different scenarios.

Registering runners

Registering a runner is the process that binds the runner with a GitLab instance.

操作流程概述

如何使用 GitLab CI/CD 进行 CI/CD 操作(这里只复述大致流程)?

1)前期设置(需要管理权限):

在某主机中,运行 gitlab-runner 进程
执行 gitlab-runner register 以向 gitlab 注册 executor 实例(可以注册各种 executor 类型)
2)开发使用:
在项目仓库中,定义 .gitlab.yml 文件
当提交后,将触发作业,开始执行流水线;

 

如下是对上述流程的补充说明,用于辅助我们理解 GitLab CI/CD 是什么:
1)对于 .gitlab.yml 文件,其内容多是 Shell 脚本,以及定义脚本的执行流程和执行条件等等;
2)可以向 gitlab 注册多个 executor 实例:SSH Executor 将在远程主机中执行命令;Docker Executor 将在容器中执行命令;
3)术语 gitlab-runner 与 executor 经常会被混淆;

参考文献

K4NZ/概念及架构(学习笔记)
Executors | GitLab
GitLab Runner | GitLab
Registering runners | GitLab

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值