- CI (Continuous Integration): tự động build và test code mỗi khi push hoặc PR, phát hiện lỗi sớm khi còn dễ fix.
- CD (Continuous Delivery): tự động deploy đến staging sau CI thành công — production deploy cần manual approval; Continuous Deployment: tự động deploy đến production không cần intervention.
- Pipeline stages điển hình: Lint → Type check → Unit tests → Build → Integration tests → Deploy staging → Smoke tests → Deploy production.
- Environment promotion: code di chuyển qua dev → staging → production — mỗi stage có environment variables riêng, không share secrets giữa environments.
- Rollback strategies: blue-green (switch traffic back), feature flags (disable feature không cần redeploy), database migration rollback (down migrations — tại sao mỗi migration cần down script).
- Feature flags: deploy code mới nhưng disable feature — gradually enable cho users, instant rollback không cần redeploy, A/B testing.
- Tools: GitHub Actions (tích hợp tốt với GitHub, marketplace), GitLab CI (built-in, tốt cho self-hosted), Jenkins (flexible nhưng phức tạp maintain), CircleCI, Buildkite (fast self-hosted runners).
- Secrets management: không commit secrets vào code — dùng GitHub Secrets, HashiCorp Vault, AWS Secrets Manager; rotate secrets định kỳ.
CI/CD là gì? Sự khác biệt giữa CI và CD?
Xem toàn bộ CI/CD cùng filter theo level & chủ đề con.
Mở danh sách CI/CD