持续交付概述
Abstract |
持续交付概述 |
Authors |
Walter Fan |
Status |
WIP as draft |
Updated |
2024-05-04 |
Overview
What’s CI
Continuous integration automates the builds, provides feedback via code review, and automates code quality and security tests. It creates a release package that is ready to be deployed to your production environment.
What’s CD
Continuous delivery automatically provisions infrastructure, manages infrastructure changes, ticketing, and release versioning. It allows, progressive code deployment, verifying and monitoring changes made and providing the ability to roll back when necessary. Together, GitLab Continuous Integration and Delivery help you automate your SDLC, making it repeatable and on-demand with minimal manual intervention
Build Pipeline
CI 环境
build server(jenkins agent or gitlab runner)
TA environment 用来做 merge request 的验证
CI 工具
merge request 可触发 build pipeline(包括代码静态检查,单元测试, api test, document generation, etc.)
只有 build pipeline 通过, merge request approve, 代码才可合并到主分支(master branch)
使用 Jenkins 和 Gitlab runner 来驱动整个 build pipeline
使用 ansible 来进行系统依赖的安装配置,并部署软件包
CI 步骤

CI 自动化流水线的构建: Jenkins and Gitlab runner
代码规范检查和静态代码扫描
单元测试
API 测试
自动生成文档
自动上传制成品