Pipeline Design Lab
Retrieval Prompts
- What are the three components of "build once, promote everywhere"?
- Name the four test types you place in a CI pipeline and the budget you allocate to each stage.
- What is the difference between a stage dependency in GitLab (
stage:) andneeds:in GitHub Actions? - Why should deployment stages reference an artifact by digest, not by tag?
- What is the minimum
permissions:block for a workflow that only reads code and runs tests?
Compare and Distinguish
Separate these pairs clearly:
- continuous integration vs continuous delivery vs continuous deployment
- an artifact identified by tag vs by digest
- a unit test vs an integration test vs a contract test
pull_requesttrigger vspull_request_targettrigger- a workflow that deploys on
pushtomainvs one that deploys onworkflow_dispatch
Common Mistake Check
For each, identify the error:
- "We rebuild the image in every environment to keep it fresh."
- "Our CI is fast -- we skip unit tests and rely on integration tests."
- "We tag
stagingandprodas separate images." - "We retry flaky tests three times to keep the pipeline green."
- "
actions/checkout@v4is fine because it's maintained by GitHub."
Mini Application
Build a CI pipeline from scratch for one of these:
- a Node.js HTTP service with Postgres
- a Go service with no external dependencies
- a Python library published to PyPI
Do all five tasks:
- author
.github/workflows/ci.yml(or.gitlab-ci.yml) that lints, tests, builds an artifact, and pushes it tagged by commit SHA - split the workflow by test tier: unit before build, integration after build
- cache dependencies correctly
- pin actions by commit SHA for anything with
secrets:exposure - set
permissions:explicitly at the workflow level
Validate by running the pipeline on a real branch.
Evidence Check
This page is complete only if:
- your pipeline runs end-to-end on push
- the deploy stage references an artifact by digest, not mutable tag
- you can explain every
uses:,needs:, orstage:line in one sentence - the entire pipeline from push to "artifact in registry" completes in < 10 minutes on a cold cache
Integrated Delivery-Process Drill
Design the team process that feeds the pipeline.
- Choose an SDLC model for a two-week feature with uncertain requirements. Explain why waterfall, ad hoc coding, and pure maintenance mode are weaker fits.
- Write a one-sprint plan with roles, backlog items, acceptance criteria, estimate ranges, and a daily feedback loop.
- Define branch discipline: trunk-based, short-lived branch, merge queue, or release branch. Include when merge, rebase, or revert is acceptable.
- Add quality gates for lint, unit tests, integration tests, dependency scan, artifact signing, and manual approval if needed.
- Connect each process choice to CI/CD evidence: what will the pipeline prove, and what still requires review?
Evidence check: include a process-selection note, a branch-policy note, and a pipeline diagram that shows where requirements, estimation, review, testing, deployment, and rollback fit.