Search Knowledge

© 2026 LIBREUNI PROJECT

Pipeline Design

Pipeline Design

A pipeline is an executable model of the delivery policy. It says what evidence is required before a change can move from source to production. A weak pipeline automates commands. A strong pipeline encodes quality gates, security checks, artifact provenance, environment promotion, and operational visibility.

Stages and Evidence

Pipeline stages should separate different kinds of evidence:

  • Static evidence: formatting, type checks, linting, policy checks.
  • Behavioral evidence: unit, integration, contract, and end-to-end tests.
  • Artifact evidence: build metadata, checksums, SBOMs, provenance.
  • Deployment evidence: rollout status, smoke tests, telemetry health.

The build artifact should be created once and promoted. Rebuilding per environment makes it hard to know whether staging and production ran the same code.

Reuse Without Obscurity

Reusable workflows and templates reduce duplication, but they can also hide important behavior. Good shared pipelines expose clear inputs, pin dependencies, document permissions, and emit logs that explain decisions. A platform team should treat pipeline templates as a product with versioning and migration notes.

Exercise

Take an existing pipeline and mark every step as one of: evidence, packaging, deployment, notification, or cleanup. Any step that fits none of these categories may be accidental complexity.

Permissions and Trust

Pipelines execute code with credentials. That makes them part of the production security boundary. A pull request from an untrusted fork should not receive the same secrets as a protected release workflow. A workflow that can change infrastructure should be harder to modify than a workflow that only runs unit tests.

Good pipeline design uses least privilege at every layer: repository permissions, workflow permissions, cloud roles, environment approvals, runner isolation, and artifact registry access. The workflow file itself is source code that controls automation. Changes to it deserve review.

Artifact Promotion

The build-once principle is central. A pipeline should produce an artifact, attach metadata, scan it, store it, and then promote that exact artifact. If staging and production each rebuild from source, the team cannot prove that staging tested production bytes. Promotion should change environment state, not artifact identity.

Observability of the Pipeline

Pipeline logs should explain decisions. If a deployment was blocked, the output should identify the failed policy, vulnerable package, missing approval, or unhealthy canary metric. Opaque shared templates create learned helplessness; engineers rerun jobs because they cannot reason about them.

Study Task

Draw the trust boundary for a release pipeline. Mark where untrusted code enters, where secrets appear, where artifacts are produced, where permissions change, and where human approval is required. Any secret available before untrusted code is isolated is a serious design smell.

Operational Review

Pipeline review should happen whenever delivery policy changes. A new reusable workflow, action, runner image, secret, environment rule, or artifact-publishing step can alter the system’s risk. Treat those changes like production code.

The review should ask whether the pipeline is understandable to a service owner. If a deployment fails, can the owner tell whether the cause is tests, packaging, security policy, approval, registry access, or environment health? If not, the pipeline is too opaque.

Finally, evaluate recovery. Can a bad pipeline template be rolled back? Can an artifact be republished safely? Can a stuck approval be audited? Can a compromised token be revoked without breaking every service? Delivery systems need their own operability.

References & Further Reading