Core Concepts · Quick recall Q&A

1 min read
Mid-level2 min read
Rapid overview

Quick recall Q&A

1. What's the difference between CI and CD?

  • CI: Automates integration - build, test, merge
  • CD (Delivery): Automates release preparation, manual deploy decision
  • CD (Deployment): Fully automated deployment to production

2. How do you handle database migrations in CI/CD?

  1. Run migrations as separate job before deployment
  2. Ensure backward compatibility (expand/contract pattern)
  3. Use feature flags for new schema requirements
  4. Test migrations against production-like data

3. Explain blue-green vs canary deployment

Blue-Green:

  • Two identical environments
  • Instant switch via load balancer
  • Fast rollback
  • Higher resource cost

Canary:

  • Gradual traffic shift
  • Monitor metrics during rollout
  • Lower risk, longer deployment
  • Requires traffic splitting capability

4. How do you secure CI/CD pipelines?

  1. Use secrets management (never commit secrets)
  2. OIDC for cloud authentication
  3. Least privilege access for service accounts
  4. Branch protection rules
  5. Audit logging
  6. Sign artifacts/images
  7. Dependency scanning

See also