Refine words

This commit is contained in:
Baohua Yang
2026-03-02 22:16:51 -08:00
parent 3af007b176
commit be09a95d0d
12 changed files with 54 additions and 49 deletions

View File

@@ -2,7 +2,7 @@
本章将演示一个基于 DockerKubernetes Jenkins/GitLab CI 的完整 DevOps 工作流
## 21.1.1 工作流概览
### 21.1.1 工作流概览
1. **Code**开发人员提交代码到 GitLab
2. **Build**GitLab CI 触发构建任务
@@ -12,7 +12,7 @@
6. **Verify**人工或自动化验证
7. **Release (Production)**审批后自动部署到生产环境
## 21.1.2 关键配置示例
### 21.1.2 关键配置示例
本节通过一组最小可用的片段展示典型 DevOps 流程中与 Docker 相关的关键配置
@@ -54,9 +54,9 @@ unit_test:
build_image:
stage: build
image: docker:20.10.16
image: docker:27
services:
- docker:20.10.16-dind
- docker:27-dind
script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
@@ -76,7 +76,7 @@ deploy_staging:
- develop
```
## 21.1.3 最佳实践
### 21.1.3 最佳实践
1. **不可变基础设施**一旦镜像构建完成在各个环境DevStagingProd中都应该使用同一个镜像 tag通常是 commit hash而不是重新构建
2. **配置分离**使用 ConfigMap Secret 管理环境特定的配置不要打包进镜像