Pipeline design
- What stages, in what order, and what fails the build? Lint, unit tests, build, integration tests, deploy.
- What belongs in CI versus CD, and what requires a human approval?
- Why keep the pipeline fast, and what do you do when it is not? Parallelise, cache dependencies, and move slow suites off the critical path.
- Build once, promote the same artefact through environments - never rebuild per environment. A frequently asked principle.
- How do you manage secrets in a pipeline, and why are they not in the repository?
Deployment strategies
| Strategy | How it works | Cost |
|---|---|---|
| Rolling | Replace instances gradually | Two versions live at once |
| Blue-green | Switch traffic between two full environments | Double the infrastructure |
| Canary | Small traffic percentage first, then widen | Needs good metrics to judge |
| Feature flags | Ship dark, enable separately | Flag debt if never cleaned up |
Database migrations, the hard part
Code can roll back; a migration that dropped a column cannot. The expected answer is the expand-and-contract pattern:
- Expand - add the new column, write to both, deploy code that tolerates both shapes.
- Migrate - backfill existing rows in batches rather than one long-running statement.
- Contract - only once nothing reads the old column, and only after you are confident you will not roll back.
- Never couple a destructive migration to the same deploy as the code change that needs it.
Quality gates and metrics
What coverage thresholds are worth (and the honest answer that coverage is a weak proxy), flaky tests as a blocker rather than something to retry around, and which metrics tell you whether the pipeline is healthy - deployment frequency, lead time, change failure rate, time to restore. The surrounding ground is in DevOps interview questions and Git interview questions.
How deep it goes by level
- Junior: the fundamentals above, explained clearly. Nobody expects production scars yet, and saying what you have not done reads better than bluffing.
- Mid-level: the same ground plus a pipeline you have built or maintained. Expect follow-ups asking why you made a choice rather than whether you know the syntax.
- Senior: a migration or rollback you led under pressure, and how you measured delivery health. The recall questions get shorter and the judgement questions get longer.
Whatever the level, say your answers out loud rather than reading them. Most of what candidates lose in a CI/CD interview is lost between knowing something and explaining it under observation - the method is in how to use AI for interview prep.
Where CoPilot Interview fits
Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.
Frequently asked questions
What are the most common CI/CD interview questions?
Designing a pipeline and its stages, the difference between deployment strategies such as blue-green and canary, how to roll back safely, running database migrations without downtime, and handling secrets in a pipeline.
How do you roll back a bad deployment?
Roll back first and diagnose afterwards - restoring service beats understanding the cause. That requires having the previous artefact ready to redeploy, and it requires that your database migrations did not make the old code unable to run.
How do you run database migrations without downtime?
Expand and contract: add the new structure, write to both old and new, deploy code that tolerates either shape, backfill in batches, and only drop the old structure once nothing reads it. Never pair a destructive migration with the deploy that depends on it.
What is the difference between blue-green and canary deployment?
Blue-green switches all traffic between two complete environments, giving an instant rollback at the cost of double infrastructure. Canary sends a small share of traffic to the new version first and widens gradually, which catches problems with less blast radius but needs good metrics to judge.
Walk into the round with a second pair of eyes
CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.
Try it free