skip to content

CI/CD Concepts

The tool-agnostic vocabulary of delivery: what a stage, runner, artifact, environment and deployment strategy actually are, independent of which YAML dialect you type them in. Interviewers ask these first because a candidate who only knows one vendor's syntax cannot design a pipeline for a different shop.

on this pageshow

questions

page 2 of 2

A monorepo pipeline that builds only affected packages let a broken package reach the main branch with its tests never running. What causes would you investigate?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Investigate the change set before the graph: a wrong or unavailable diff base, a shallow clone with no common ancestor, and a squash or rebase that moved the fork point. Then check for a real dependency edge the graph never had.

open as a page

Your latest release is 2.1.0, and a critical bug is reported by customers still running 1.9.3. How do you ship the fix, and what version does it carry?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Release it as 1.9.4 from a maintenance line cut at the v1.9.3 tag, containing only the fix. Publish it on a separate release channel so 1.x users receive it while 2.x users are not pulled backwards, and land the same fix on the mainline.

open as a page

Your CI must post a coverage comment on pull requests opened from forks, so a team proposes running the fork's build in a job that already holds the repository write token. Why is that dangerous, and what is the safe pattern?

level: seniorimportance: should knowfreq 44%

basics

~20 s

A fork pull request is untrusted code, and any credential present in the job's environment is available to it — build scripts, test hooks and dependency install hooks all execute before anyone reviews the diff. Split it: run the untrusted build with no credentials, hand its output to a separate trusted job that never checks out the fork's code.

open as a page

Why do CI platforms withhold repository secrets from pipelines triggered by pull requests from forks, and what legitimate checks does that break?

level: seniorimportance: should knowfreq 45%

basics

~20 s

A fork pull request runs code, and often a pipeline definition, written by someone with no write access. If secrets were injected, a one-line change would print or exfiltrate them. Withholding them breaks checks that need real credentials, which must be restructured rather than re-enabled.

open as a page

A cloud role's OIDC trust policy for CI pins the issuer, the audience and the repository, but not the branch. What can go wrong?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Any pipeline run in that repository can assume the role — including one from a throwaway branch. Anyone able to push a branch and trigger CI can rewrite the pipeline to run arbitrary commands with production credentials, without review.

open as a page

An outside contributor cannot merge anything to your main branch, but they can open a pull request that triggers CI. What can they still make your pipeline execute, and how do you limit it?

level: seniorimportance: should knowfreq 38%

basics

~20 s

They control the branch the build checks out, so they control the build scripts, test files and configuration the pipeline invokes — and often the pipeline definition itself. Running the branch's tests is running their code.

open as a page

Your build already publishes an SBOM for every artifact. What does a build provenance attestation tell a consumer that the SBOM cannot, and what does verifying one actually check?

level: seniorimportance: should knowfreq 32%

basics

~20 s

An SBOM lists what is inside an artifact; provenance is a signed statement about how the artifact was produced — which builder, which source repository and commit, which parameters. Verification checks that statement against a policy, bound to the artifact's digest.

open as a page

Your compliance regime requires a documented human approval before every production change, and the team wants to deploy twenty times a day. How would you satisfy both?

level: principalimportance: should knowfreq 40%

basics

~20 s

Separate the control objective from its implementation. The requirement is that someone other than the author authorized the change and that evidence survives; it is not that a person clicks a button per deploy. Peer review bound to the deployed artifact usually satisfies it.

open as a page

As the owner of a large monorepo's CI, how far would you trust the affected-target graph as the only pre-merge gate, and what backstop would you run?

level: principalimportance: should knowfreq 33%

basics

~20 s

Trust it in proportion to how the edges are derived: enforced declarations earn near-total trust, inferred imports earn conditional trust. Either way run a periodic full build so an escape is bounded by that interval rather than discovered by a customer.

open as a page

Your verification suite has grown to 40 minutes and currently runs in full on every push. How would you decide which work runs on which trigger?

level: principalimportance: should knowfreq 44%

basics

~20 s

Tier the work by who is waiting for it: fast checks on every proposal update, the full gate where changes land, and slow or drift-detecting suites on a schedule. Each move trades earlier feedback for compute, or compute for later discovery of a failure.

open as a page

You set release policy for an organisation shipping both internal libraries and continuously deployed services. How do you decide each one's versioning scheme and release cadence?

level: principalimportance: should knowfreq 30%

basics

~20 s

Decide by consumer. Anything other teams resolve through a dependency range gets SemVer plus a written deprecation policy. Anything deployed only by the team that owns it gets a build identifier and continuous release, because a compatibility claim nobody reads is pure ceremony.

open as a page

Your estate has long-lived cloud keys stored in dozens of pipelines. How would you plan the move to OIDC federation, and which credentials cannot move?

level: principalimportance: should knowfreq 33%

basics

~20 s

Inventory every stored credential, rank by blast radius, and migrate the highest-privilege deploy keys first. Run federation alongside the old key, cut over, then confirm from provider usage data before deleting. Anything without a federation path gets shortened lifetime and tighter scope instead.

open as a page

Some monorepo teams generate the CI pipeline from the affected package set instead of writing every job statically. What does that buy, and what does it cost?

level: middleimportance: nice to knowfreq 28%

basics

~20 s

Generation keeps the pipeline proportional to the change: a small setup job computes the affected packages and emits a child pipeline containing only those jobs. The cost is that the definition no longer exists in the repository — it is program output, so it is harder to review, reason about and debug.

open as a page

When would you version a project with CalVer (a calendar-based number such as 24.04) instead of SemVer, and what do you give up by doing so?

level: middleimportance: nice to knowfreq 34%

basics

~20 s

CalVer encodes when a release was made; SemVer encodes whether it will break you. Choose CalVer for cadence-driven products with support windows and no dependency-resolver consumers — distributions, applications, data snapshots — and accept that the number carries no compatibility signal.

open as a page

Your CI provider masks registered secret values in job logs. What does that masking catch, and what defeats it?

level: middleimportance: nice to knowfreq 38%

basics

~20 s

Masking is a literal string replacement on log output: it catches a secret printed verbatim. Anything that changes the bytes — encoding, splitting, trimming — or that leaves the log stream entirely defeats it, so treat it as a backstop, not a control.

open as a page

What does a shared remote build cache give a CI fleet that a per-runner local cache cannot, and what must be true of a build for a cross-machine cache hit to be safe?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

A remote cache is content-addressed by a hash of a task's declared inputs, so any machine that computes the same hash reuses the output — across ephemeral runners, branches and developer laptops. It is safe only if nothing outside those declared inputs affects the output.

open as a page

A team runs one canary instance beside twenty stable instances and calls it a 5% canary. Why might the canary receive far more or far less than 5% of requests, and what actually controls the real share?

level: seniorimportance: nice to knowfreq 32%

basics

~20 s

Instance count only approximates traffic share when balancing happens per request. With long-lived connections, session affinity or client-side balancing, clients are pinned at connect time, so the canary's real share is set by the routing layer — not by arithmetic on instance counts.

open as a page

A change reached production without passing the pipeline's required security-scan gate. How do you work out how it got there, and how would you design gates so that route is closed?

level: seniorimportance: nice to knowfreq 34%

basics

~20 s

Start from the target's deployment record and identify which principal performed the deploy. Either it was the pipeline, and the gate did not apply or did not fail closed, or it was some other identity deploying outside the pipeline entirely — which no in-pipeline gate could ever have stopped.

open as a page

A busy branch receives several pushes a minute and the CI queue keeps growing. What does grouping runs under a concurrency key and cancelling superseded runs buy you, and where is that dangerous?

level: seniorimportance: nice to knowfreq 42%

basics

~20 s

Grouping runs by a key such as the branch or proposal, and cancelling the older in-flight run when a newer one arrives, keeps at most one active run per key. It cuts queue depth and spend, since only the newest commit's result is usually wanted — but cancelling deploys is unsafe.

open as a page

For which kinds of software can a delivery pipeline genuinely not ship the identical artifact to every environment or channel, and what would you put in place to compensate?

level: principalimportance: nice to knowfreq 30%

basics

~20 s

When the output is genuinely per-target: platform-specific binaries, store-signed mobile builds, compiled-in tenant branding, or artifacts rebuilt inside an air-gapped boundary. Compensate with reproducible builds, hash comparison, a thin divergent layer, and testing every variant that ships.

open as a page

You own an autoscaling pool of single-use CI runners. How do you decide between scaling to zero and keeping warm capacity, and what would you measure to know the choice was right?

level: principalimportance: nice to knowfreq 32%

basics

~20 s

Trade idle machine cost against developer wait time, and price both. Measure queue wait separately from job duration, at high percentiles, alongside provisioning latency. Fix slow provisioning before buying warm capacity, then size a minimum pool to absorb the usual arrival burst.

open as a page

As of SLSA v1.0, what do Build levels 1, 2 and 3 require, and how would you decide how far to push a large organisation up that ladder?

level: principalimportance: nice to knowfreq 24%

basics

~20 s

SLSA v1.0's Build track defines three levels: L1 produces provenance, L2 signs it and has a hosted build platform generate it, L3 hardens that platform so build steps cannot forge provenance. Levels apply per artifact and pay nothing unless someone verifies.

open as a page

showing 31–52 of 52