Interview questions in CI/CD & Automation

What is CI, and what is its single most important goal?
Frequent merges to a shared branch with automated build and test; top goal is a workable integrated codebase.
Describe the typical CI pipeline sequence from push to deploy
This tests stage ordering and failure handling. A strong answer lists build, test, and deploy stages; notes intra-stage parallelism and inter-stage sequencing; and mentions early termination on failure.
Continuous Delivery vs Continuous Deployment: key differences and choosing between them
Tests the human-gate distinction: Delivery readies artifacts but requires manual approval; Deployment pushes automatically. Strong answers cite compliance, blast radius, and maturity. Red flag: conflating terms or claiming full automation fits every app.

What is a build artifact and why build once deploy many crucial?
Tests whether you see artifacts as immutable deployable units. A strong answer says one binary is promoted through all stages, config is externalized, and rebuilding per environment creates drift. Red flag: accepting per-environment rebuilds.

What does shift left mean in CI/CD, and give two concrete examples?
Your grasp of moving verification earlier to reduce cost and risk. Define shift left as earlier-stage testing; cite two concrete examples like pre-commit unit tests and PR-level SAST scans. Never call it "more testing" instead of earlier feedback.

What is Infrastructure as Code (IaC), and how does it support CI/CD?
This tests if you link declarative definitions to repeatable pipelines. A strong answer covers idempotence, versioned templates, and preventing snowflake environments. A red flag is calling IaC mere scripting without CI/CD integration.
Pipeline is green but lead time grows. Three areas to investigate?
This tests distinguishing pipeline health from delivery flow efficiency. A strong answer targets pre-merge wait states, slow green pipeline stages, and post-merge deployment friction, using time-in-stage metrics.

How does your CI/CD strategy differ between monoliths and microservices?
Contrast monolith unified builds with microservice independent deploys, side-by-side versions, and service gates.
Explain blue-green deployment, its prerequisites, and how it reduces deployment risk.
Tests operational maturity for zero-downtime cutover. Great answers: parallel environments, load balancer switching, backward-compatible schemas, externalized state, and instant rollback vs partial in-place failure.
Difference between git merge and git rebase before a pull request
Rebase rewrites SHAs, duplicating CI builds; merge keeps identity and triggers one build.
Describe using a pre-push Git hook for checks and its CI limitations.
It tests client-side automation versus server-side policy. An executable .git/hooks/pre-push script runs tests and exits non-zero to block, noting hooks are not cloned, skipped via --no-verify, and local-only. A red flag is treating them as policy gate.
Describe Trunk-Based Development principles and CI/CD benefits
Tests if you view TBD as a CI/CD enabler versus GitFlow. Good answers name a single trunk, branches under 24 hours, pre-integrate builds, and feature flags, tying daily commits to releasable code and less merge hell. Red flag: endorsing long-lived branches.

How do feature flags enable unfinished work in Trunk-Based Development?
Commit behind off flags; CI/CD deploys trunk continuously; flags gate exposure for gradual rollouts.
How do you safely merge a 50-commit stale branch with conflicts?
Assess relevance, merge main locally, validate via draft PR and tests, merge off-peak with rollback ready.

How do you fully remove leaked credentials from Git history?
This tests Git history rewriting and incident response. Rotate the secret first, then use git-filter-repo to purge the file, force-push main, and require all teammates to re-clone before resuming. A red flag is recommending git revert or skipping rotation.

Compare git submodules and git subtree for CI/CD
Tests dependency integration trade-offs in CI. Submodules need recursive clones and pinned commits, complicating checkout; subtree inlines code, simplifying clone but bloating history. Red flag: omitting submodule detached HEAD pain or calling subtree free.
How do build tools differ from compilers or interpreters?
This tests whether you see compilation as only one step in a repeatable pipeline. A strong answer covers dependency resolution, transitive libraries, task automation, and artifact packaging.

Your build times increased significantly. How do you investigate and optimize?
Tests methodical CI/CD bottleneck analysis and build optimization tactics. Strong answers baseline the timeline, isolate the slowest stage with metrics, then apply parallelism, caching, or dependency pruning.
Explain dependency management and diamond conflicts in automated builds
Tests transitive dependency resolution and conflict strategies in build pipelines. Strong answers mention nearest-wins eviction, strict versioning, shading, or classloader isolation. Red flag: manual jar swaps or pinning without understanding ABI breakage.

Compare ephemeral container agents versus persistent build agents
Ephemeral agents ensure clean state but add cold-start latency; persistent agents speed builds via caching yet risk config drift.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles