Một DevOps pipeline đầy đủ gồm 9 stage liên tiếp, thường được visualize thành vòng lặp vô tận (infinity loop). Chia thành hai nửa lớn: CI (Plan → Package) và CD (Configure → Monitor).

Các stage

StageThuộcMô tả
PlanCI foundationTracking tiến độ, từ request đến release. Dùng Agile tools, backlog, sprints
CreateCI foundationViết code + documentation. Version control lưu cả test script
BuildCICompile, orchestrate changes
VerifyCITest quality: unit test, static analysis (lint, SAST, dependency scan)
PackageCITạo artifact (container image, binary) sẵn sàng cho deployment
ConfigureCDIaC: provision/update resources trong các environments
ReleaseCDDeploy artifact vào môi trường, kiểm soát visibility qua feature flags
Verify (CD)CDAdvanced testing trong môi trường thật: functional, load/perf, DAST, IaC scan
MonitorCDPerformance monitoring, log collection, alerting

Shift-Left Security (DevSecOps)

Triết lý “shift-left” đưa security vào sớm nhất có thể, ngay trong giai đoạn CI:

  • SAST (Static Application Security Testing) — phân tích code tĩnh
  • Dependency scanning — kiểm tra vulnerability trong dependencies
  • License scanning — compliance
  • DAST (Dynamic Application Security Testing) — giả lập tấn công trong môi trường CD
  • IaC scanning — kiểm tra Terraform/Helm templates (Trivy)
  • Container scanning — kiểm tra image (Trivy)

Feature Flags trong Release Stage

Feature flags tách biệt deployment khỏi release: code có thể được deploy lên production nhưng chưa visible với user. Cho phép:

  • Gradual rollout (canary, progressive delivery)
  • Nhanh chóng rollback bằng cách tắt flag, không cần redeploy

Tools phổ biến: LaunchDarkly, Flagsmith, CloudBees Feature Management.

Connections

Sources