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

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


posted @ 2021-01-06 17:04  研究林纳斯写的  阅读(51)  评论(0编辑  收藏  举报