CI/CD Interview Questions and Answers
Pipeline design, artefacts, deployment strategies and rollbacks.
Whether you are preparing for entry-level CI/CD interview questions for freshers or senior software engineer interview questions addressing concurrency, scalability, and system architecture, this track provides peer-reviewed model answers with syntax walkthroughs, edge cases, and practical interview tips.
1 What is a blue/green deployment? Easy
Blue/green is a deployment strategy with two identical environments. Blue runs the current version, and green runs the new version.
Process:
- Deploy the new release to the idle environment and run smoke tests.
- Shift traffic to it, usually by switching a router, load balancer, or DNS.
- If something breaks, switch traffic back to the old environment almost instantly.
- Keep the old environment until the new one is proven, then reuse it for the next release.
aws elbv2 modify-listener --listener-arn arn:... \
--default-actions Type=forward,TargetGroupArn=arn:...green
Benefits: near-zero downtime, fast rollback, and the ability to test in production-like conditions. Drawbacks: double the infrastructure cost and tight data or schema compatibility between versions. It works best with stateless services and backward-compatible database migrations.
2 What is the difference between a pipeline stage and a job? Easy
Stages and jobs structure a pipeline into ordered, parallelisable work.
- Stage: a logical phase such as build, test, or deploy. Stages run in order, and a later stage starts only when earlier stages succeed. Stages express the release lifecycle.
- Job: the actual unit of work inside a stage, running on a runner or agent. Jobs within the same stage can run in parallel. Each job has steps, scripts, and its own environment.
stages: [build, test, deploy]
test:
stage: test
script:
- npm ci
- npm test
For example, a test stage may run unit, integration, and lint jobs concurrently, and then a deploy stage runs only if all pass. Jobs can produce artefacts that later jobs consume. Some tools call these stages and jobs, while others use workflows and jobs, but the concept is the same: ordered phases and parallel tasks.
Frequently Asked Questions About CI/CD Interviews
What do hiring managers evaluate in CI/CD technical rounds?
Technical interviewers look for foundational fluency, idiomatic syntax, clarity when communicating complex logic, and awareness of performance trade-offs (e.g. memory footprint, render performance, and network latency) in production environments.
What are the best interview tips for practicing CI/CD questions?
Use active recall: summarize each answer in your own words before revealing the model solution. Focus on explaining why a certain approach is chosen rather than just memorizing code syntax.