Builds must be reproducible: the same commit should produce the same pipeline behaviour next month. What do you pin?
IntermediateScenarioPipeline Design & Triggers
Answer
Situation read → Drift comes from runner images, actions, tool versions and dependencies.
What I'd do →
runs-on: ubuntu-24.04(not latest).- Actions pinned to SHAs with Dependabot updates.
- Tool versions explicit:
node-version-file: .nvmrc,terraform_version: 1.9.8, kubectl viaazure/setup-kubectlwithversion: v1.31.2. - Lockfiles with
npm ci,pip install --require-hashes. - Base images pinned by digest in Dockerfiles.
Why → "Nothing changed but CI broke" is almost always one of these floating.
Interview tip → Mention that hosted runner images update weekly; preinstalled tool versions are not a contract.
More on Pipeline Design & Triggers
You join a team whose single 900-line workflow runs everything on every push to every branch. How do you restructure it?IntermediatePushing to a PR branch runs CI twice (once for push, once for pull_request). How do you fix it?BeginnerProduct wants a "Deploy to staging" button that lets QA pick a version. Design it.BeginnerA nightly security scan should run at 02:00 India time on weekdays and also be runnable on demand. Write it.BeginnerYour team wants preview environments per PR on EKS, destroyed when the PR closes. Design the workflow.AdvancedTwo workflows must run in sequence: CI then a separate deploy workflow owned by another team. How do you link them?Intermediate