CI/CD interview questions
6 questions interviewers actually ask, each with a model answer you can study and an AI drill that grades how you would say it out loud.
0/6
Mastered
Questions and answers
Model answer
Continuous delivery means every change that passes the pipeline is ready to release, but a human approves the final push to production. Continuous deployment removes that gate, so every green build deploys to production automatically. Both rely on strong automated testing; deployment just trusts the pipeline enough to skip manual approval.
Model answer
Cache dependencies between runs, parallelize independent jobs, run the cheapest and most likely to fail checks first to fail fast, and only run heavy end-to-end tests on the right triggers. Building an artifact once and promoting it through stages, rather than rebuilding per stage, also saves significant time.
Model answer
Store secrets in the CI provider encrypted store or an external secrets manager, inject them as masked environment variables at runtime, and scope each secret to the minimum jobs or environments. Never commit secrets to the repo or echo them in logs, and rotate them regularly. Prefer short-lived, OIDC-based credentials over long-lived keys.
Model answer
Blue-green keeps two identical environments and switches all traffic from the old to the new at once, giving instant rollback by switching back. Canary releases the new version to a small slice of traffic, watches metrics, and gradually ramps up, limiting blast radius. Canary catches problems with real traffic; blue-green is simpler but flips everyone at once.
Model answer
A quality gate is an automated checkpoint that must pass before the pipeline continues, such as passing tests, meeting a coverage threshold, no critical vulnerabilities, or successful linting. Gates encode the team standard so bad changes stop automatically instead of relying on people to remember to check.
Model answer
Deploy immutable, versioned artifacts so the previous version is always available, keep database migrations backward-compatible, and decouple deploy from release using feature flags. Automate health checks after deploy and wire automatic rollback on failure. The goal is that reverting is a fast, boring, well-rehearsed operation.