I07 · CI-CD & 部署 詳細 ROADMAP
計畫文件,不會被 Quartz 渲染。
回主 roadmap → infra/ROADMAP.md
章節目標
從 code 到 production 的流水線。本章處理 CI/CD pipeline 設計、IaC、GitOps、Deployment Strategy、多環境 promotion。這些是平台工程師的主場——backend 工程師只需「讀得懂」(見 backend/deployment/ B18 #18),深入規劃運維在這。
🌱 基本介紹
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 01 | CI-CD 全景 | 01-cicd-landscape | 🌱 | Git → Build → Test → Scan → Push → Deploy 完整 pipeline;每階段責任 |
❓ 為什麼需要
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 02 | 為什麼 CI Pipeline 必含 lint + test + scan | 02-why-cicd-must-have-quality-gates | 🌱 | 缺哪一環就對應的問題進 prod;pipeline 就是自動化 gatekeeper |
| 03 | 為什麼要 IaC 不要 ClickOps | 03-why-iac-over-clickops | 🌱 | 手動點 console 不可重現、審計不完整、新人 onboarding 痛 |
| 04 | 為什麼 Zero-downtime Deploy 不是可選 | 04-why-zero-downtime | 🌱 | 金流 / 電商 / 24/7 service 掛 1 分鐘 = 損失;鋪天蓋地的需求 |
| 05 | 為什麼 GitOps 值得投入 | 05-why-gitops | 🌱 | Git 作 source of truth / declarative / 自動 sync / audit trail |
🕰️ 演進
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 06 | CI-CD 核心演進 | ⛔️ infra/cicd-deployment/05-infra-core-cicd | 🌿 | 跨系列 |
| 07 | Git CI 流程演進 | ⛔️ infra/cicd-deployment/06-git-ci-release | 🌿 | 跨系列 |
| 08 | CI-CD 演進驅動力 | 08-cicd-evolution-drivers | 🌱 | Jenkins 自架 plugin 噩夢撞牆 → GitHub Actions / GitLab CI 託管;YAML pipeline 難維護撞牆 → Dagger(code-as-pipeline);手動部署撞牆 → Argo CD / Flux GitOps;IaC 單向撞牆 → Crossplane / control plane 化 |
🧠 知識型
F07-A CI Pipeline 設計
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 09 | CI 核心 | ⛔️ infra/cicd-deployment/05-infra-core-cicd | 🌿 | 跨系列 |
| 10 | Git CI 釋出流程 | ⛔️ infra/cicd-deployment/06-git-ci-release | 🌿 | 跨系列 |
| 11 | CI/CD 平台全景選型 | 11-cicd-platform-selection | 🌱 | Jenkins / GitLab CI / GitHub Actions / Buildkite / Dagger / CircleCI / Drone / Argo Workflows 全景對比:host 模式(自架 vs SaaS)、pipeline 語言(YAML vs code-as-pipeline)、執行引擎(K8s-native vs runner)、價格 / 適用規模。為什麼還有人留在 Jenkins、為什麼小團隊直上 GHA、為什麼 Dagger 是未來 |
| 12 | GitLab CI/CD 模板 | ⛔️ infra/cicd-deployment/08-gitlab-cicd-templates | 🌿 | 跨系列 |
| 13 | GitHub Actions 進階 | 13-github-actions-deep | 🌱 | reusable workflow / composite action / OIDC / matrix / secret 管理 |
| 14 | 微服務 CI/CD(吸收 micro-service/48) | ⛔️ backend/micro-service/48-cicd-microservice | 🌿 | 跨系列 |
| 15 | CI/CD Per Service(吸收 backend B08 #40) | 15-cicd-per-service-ops | 🌱 | 從 backend 吸收:Monorepo vs Multirepo;selective build;image tagging |
| 16 | Pipeline Runner 運維 | 16-runner-ops | 🌱 | Self-hosted runner;scaling;資源隔離;K8s runner(ARC) |
F07-B IaC(Infrastructure as Code)
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 17 | IaC 基礎 | ⛔️ infra/cicd-deployment/31-infrastructure-as-code | 🌿 | 跨系列 |
| 18 | Terraform 深入 | 18-terraform-deep | 🌱 | State management(remote backend / locking);module 設計;CI/CD 整合 |
| 19 | Pulumi / CDK / Crossplane 選型 | 19-iac-alternatives | 🌱 | 用 general language vs HCL;Crossplane K8s-native 方向 |
| 20 | Ansible / Salt(config management) | 20-config-management | 🌱 | 還有市場嗎?地端 fleet 管理場景 |
F07-C 發布策略
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 21 | Rolling / Blue-Green / Canary 深入 | 21-deployment-strategies-deep | 🌱 | 每種策略的 infra 層機制;跟 management/engineering-process/08-release-methodology/01 分工 |
| 22 | Zero-downtime Deploy 實戰(吸收 micro-service/49) | ⛔️ backend/micro-service/49-zero-downtime-deploy | 🌿 | 跨系列 |
| 23 | Progressive Delivery(Argo Rollouts / Flagger) | 23-progressive-delivery | 🌱 | Canary 自動化;SLO-based rollback;跟 I05 SLO 連動 |
| 24 | Feature Flag 跟部署的配合 | 24-feature-flag-deploy | 🌱 | Decoupling deploy from release;infra 視角的 FF(部署時機 vs 功能開關) |
F07-D GitOps
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 25 | K8s GitOps | ⛔️ infra/k8s/08-k8s-gitops | 🌿 | 跨系列 |
| 26 | Argo CD 深入 | 26-argocd-deep | 🌱 | App of Apps / ApplicationSet / Sync wave / health check |
| 27 | Flux 深入 | 27-flux-deep | 🌱 | Helm / Kustomize 整合;multi-tenancy;跟 Argo CD 選型 |
| 28 | Helm / Kustomize / Timoni 選型 | 28-k8s-config-tools | 🌱 | 各自哲學;2026 新玩家(Timoni / CUE-based) |
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 29 | 環境分離 | ⛔️ infra/cicd-deployment/25-environment-separation | 🌿 | 跨系列 |
| 30 | 多環境 Promotion 策略 | 30-multi-env-promotion | 🌱 | dev → staging → prod;同 artifact 跨環境;跟 GitOps 整合 |
| 31 | Ephemeral Environment(per-PR) | 31-ephemeral-env | 🌱 | Vercel / Railway / Render 類模式自架;K8s namespace per-PR |
F07-F Image Registry & Supply Chain
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 32 | Image Registry 運維 | ⛔️ infra/compute/07-container-registry | 🌿 | 跨系列 |
| 33 | SBOM / Signed image 在 CI 整合 | 33-sbom-signing-ci | 🌱 | 本章聚焦 CI pipeline 怎麼串 signing:cosign CLI / Sigstore GitHub Actions / Binary Authorization deploy policy;image 本身的 signing 鏈 + SLSA provenance 見 infra/compute/ I03 14-15 |
🔧 小實作注意事項
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 34 | 從零寫 GitHub Actions pipeline | 34-github-actions-from-scratch | 🌱 | lint + test + scan + build + push + deploy;reusable workflow |
| 35 | 本機 Argo CD demo | 35-argocd-demo | 🌱 | Kind cluster + Argo CD + sample app;GitOps workflow 實作 |
| 36 | Terraform module 從零建 | 36-terraform-module-scratch | 🌱 | 寫 VPC / EKS module;state 管理;testing with terratest |
💣 Anti-pattern
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 37 | CI-CD Anti-patterns | 37-cicd-antipatterns | 🌱 | Pipeline 沒含 lint + test;用 latest tag;CI 時效 30+ 分鐘;Long-lived token;deploy 靠手動 kubectl;沒 rollback 計畫;多 cluster 手動 sync;Terraform state 沒 lock |
🧰 對應檢查工具
| # | 主題 | Slug | Stage | 大綱 |
|---|
| 38 | CI-CD 工具 | 38-cicd-tooling | 🌱 | GitHub Actions / GitLab CI / Jenkins / Buildkite / Dagger;Terraform / Pulumi / Crossplane;Argo CD / Flux / Argo Rollouts;Helm / Kustomize / Timoni |
📎 補充
| # | 主題 | Slug | Stage | 大綱 |
|---|
| S01 | 好的 CI/CD Pipeline 體檢 | ⛔️ common/quality/standards/06-good-cicd-pipeline | 🌿 | 跨系列 |
| S02 | 從 Jenkins 遷到 GitHub Actions 路徑 | s02-jenkins-to-gha-migration | 🌱 | 實戰遷移策略;共存期;跨團隊 rollout |
章節進度統計
- 知識主題:38 + 2 補充 = 40 項(2026-04 新增 #11 CI/CD 平台全景選型)
- 🌿 growing:7(既有 infra/ + pointer)
- 🌱 seed:33
跨系列連結
- →
infra/cicd-deployment/05, 06, 08, 25, 31(原始 CI-CD 篇)
- →
infra/k8s/08-k8s-gitops
- →
infra/compute/07-container-registry
- →
backend/deployment/ B18 17-18(已 pointer 到本章)
- →
backend/architecture/ B08 #40 CI-CD per service(已 pointer)
- →
backend/micro-service/48-49(microservice CI/CD / zero-downtime)
- →
management/engineering-process/08-release-methodology/01
- →
common/quality/standards/06-good-cicd-pipeline
- →
infra/cloud/aws/10-aws-cicd(雲端 CI/CD 實作)
- → I03 Compute(部署目標)
- → I06 Security(pipeline 中 security scanning)