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.
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ỳ.
EN
CI (Continuous Integration): automatically builds and tests code on every push or PR, catching errors early while they are still easy to fix.
CD (Continuous Delivery): automatically deploys to staging after CI succeeds — production deployment requires manual approval.
Continuous Deployment: automatically deploys to production without any intervention.
Environment promotion: code moves through dev → staging → production — each stage has its own environment variables; secrets are never shared between environments.
Rollback strategies: blue-green (switch traffic back), feature flags (disable a feature without redeploying), database migration rollback (down migrations — why every migration needs a down script).
Feature flags: deploy new code but disable the feature — gradually enable for users, instant rollback without redeployment, A/B testing.
Tools: GitHub Actions (tight GitHub integration, marketplace), GitLab CI (built-in, great for self-hosted), Jenkins (flexible but complex to maintain), CircleCI, Buildkite (fast self-hosted runners).
Secrets management: never commit secrets to code — use GitHub Secrets, HashiCorp Vault, AWS Secrets Manager; rotate secrets regularly.
Xem toàn bộ CI/CD cùng filter theo level & chủ đề con.