A reliable CI/CD pipeline is more than a sequence of build commands. It is a controlled path from a code change to a tested, observable, reversible release. This guide provides a reusable checklist for designing that path, including pipeline stages, Git workflows, testing gates, artifacts, environments, secrets, approvals, rollback plans, and operational metrics.
Overview
CI/CD pipeline design starts with a clear separation between continuous integration and continuous delivery or deployment. Continuous integration validates changes frequently as they enter a shared codebase. Continuous delivery prepares a verified release for deployment, while continuous deployment automatically promotes an eligible release when its controls pass.
The right level of automation depends on the application, risk profile, team structure, and operational maturity. A small internal service may need a short pipeline with unit tests, packaging, and an automated deployment. A regulated or customer-facing system may require stronger isolation, manual approvals, security checks, evidence collection, and staged promotion. The objective is not to add the maximum number of CI/CD tools. It is to make the delivery path predictable, auditable, and easy to recover.
Before selecting or replacing tools, document the delivery workflow in plain language. Identify the event that starts a run, the inputs it uses, the checks that must pass, the artifact produced, the environments it can enter, and the person or system responsible for each decision. The DevOps Tools Directory guide can help when mapping capabilities to tools, but the workflow should determine the tool choice rather than the reverse.
- Repeatability: the same source revision and configuration should produce an equivalent result.
- Traceability: each deployment should identify its commit, artifact, approvals, and environment.
- Fast feedback: inexpensive and high-signal checks should run before slower checks.
- Controlled promotion: production access should follow explicit rules rather than informal conventions.
- Recovery: a failed release should have a documented and tested response.
Checklist by scenario
For a new application pipeline
- Define the source boundary. Decide which repositories, branches, tags, and files can trigger a run. Make pull requests or equivalent review events part of the normal validation path.
- Order the stages by feedback value. Begin with formatting, dependency installation, compilation, and unit tests. Follow with integration tests, security checks, packaging, and deployment-oriented validation.
- Pin the build inputs. Use a declared runtime version, lock dependency versions where appropriate, and identify the base image or build environment. Record changes to these inputs as code changes.
- Create one immutable artifact. Build once, assign a version or revision identifier, and promote that artifact through environments. Avoid rebuilding separately for staging and production because the outputs may differ.
- Make environment configuration explicit. Keep environment-specific values outside the artifact while defining their names, sources, validation rules, and ownership.
- Add a deployment health check. A successful command is not necessarily a healthy service. Check readiness, essential dependencies, logs, and a small set of meaningful application signals.
For a team refining its Git workflow
Choose a branching model that matches the team's release frequency and review habits. The important decision is not the label applied to the model; it is how clearly it answers these questions:
- Where are changes reviewed before they reach the shared branch?
- Which branch or tag represents a releasable state?
- Can urgent fixes be released without bypassing essential checks?
- How are long-lived branches prevented from drifting away from the main line?
- Who can merge, release, or alter pipeline definitions?
Protect the branch that represents deployable code, require successful checks before merging, and keep the approval rules understandable. A useful SRE alert fatigue checklist is also relevant here: pipeline notifications should be actionable, routed to an owner, and limited to signals that require attention.
For infrastructure and platform changes
Infrastructure pipelines need additional safeguards because a small change can affect shared services or multiple applications. Use a plan or preview step before applying changes, review the proposed impact, and separate the identity that can read state from the identity that can modify production resources.
- Store infrastructure definitions and reusable modules in version control.
- Run formatting, validation, static analysis, and policy checks before a plan is approved.
- Keep state in a controlled location with access management, locking, and recovery procedures appropriate to the platform.
- Make environment differences explicit instead of copying and manually editing configuration.
- Record who approved and applied a change, along with the source revision and resulting plan.
For broader platform work, review the guidance on creating cloud guardrails without slowing developers and on policy as code tools. These controls work best when they are tested in the same workflow as the infrastructure they govern.
For production deployment automation
Define the promotion strategy before automating the production step. Common options include a staged rollout, canary release, blue-green deployment, or a controlled replacement. The appropriate choice depends on traffic patterns, state handling, observability, and the team's ability to reverse a change.
- Specify the deployment target and the access identity used by the pipeline.
- Declare pre-deployment checks, approval requirements, and change windows where applicable.
- Set a clear observation period and success criteria after deployment.
- Document whether rollback restores the previous application artifact, configuration, database state, or some combination.
- Ensure the on-call team can identify the release and stop further promotion.
What to double-check
Testing gates
Tests should answer specific risk questions. Unit tests provide fast feedback on isolated behavior; integration tests examine boundaries such as databases, queues, or external interfaces; end-to-end tests validate important user journeys. Do not treat a high test count as proof of coverage. Track which failure modes each gate is intended to detect, and remove or repair checks that are consistently noisy.
Secrets and permissions
Do not place credentials in source code, build logs, generated artifacts, or unprotected pipeline variables. Prefer short-lived credentials and narrowly scoped identities where the platform supports them. Separate permissions for building, deploying to non-production environments, and deploying to production. Review whether a pull request from an untrusted context can access secrets before any workflow is enabled.
Artifacts and provenance
An artifact should be identifiable without inspecting its contents. Include the source revision, build version, and relevant dependency or configuration references in the release metadata. Retain enough information to answer what was deployed, when it was built, which checks passed, and who or what promoted it.
Rollback and data changes
Application rollback is not always database rollback. Schema changes may be irreversible, and a previous application version may not understand a new data shape. Prefer backward-compatible migration steps when possible, separate destructive changes from routine deployment, and test the recovery procedure in an environment that resembles production.
Observability and scheduled work
Deployment automation should connect to logs, metrics, traces, and incident response rather than operating as an isolated system. Scheduled pipelines also need ownership, timezone clarity, failure notifications, and a documented way to pause or rerun them. For recurring jobs, use a validated schedule and review the cron expression builder guide when expressions change.
Common mistakes
- Rebuilding the artifact for every environment: this weakens traceability and can introduce environment-specific differences.
- Putting every check in the first stage: slow feedback encourages developers to ignore or bypass the pipeline. Order checks from fast and local to slower and broader.
- Using production credentials for convenience: excessive privilege turns a pipeline compromise into a larger incident. Use separate, limited identities.
- Making manual approvals the only safety control: an approval prompt cannot replace tests, deployment health checks, or a rollback plan.
- Allowing pipeline definitions to change without review: workflow code can grant permissions or alter release behavior, so protect it like application code.
- Measuring only deployment frequency: speed without reliability is not a useful outcome. Also examine failed runs, time to restore service, queue time, and the age of unresolved pipeline failures.
- Ignoring the operator experience: unclear logs, duplicate notifications, and missing ownership make a technically correct pipeline difficult to use.
When to revisit
Review the pipeline before seasonal planning cycles, major architecture changes, and any expansion into a new environment or deployment target. Revisit it sooner when the workflow, repository structure, build runtime, cloud permissions, testing strategy, or chosen CI/CD tools change.
Use this short review at least whenever a release process is redesigned:
- Trace one recent production deployment from commit to artifact to environment.
- Confirm that every required check has an owner and a documented reason.
- Run a rollback or recovery exercise and record the gaps.
- Review secret access, service identities, and pipeline permissions.
- Compare pipeline duration and failure patterns with the team's current delivery needs.
- Remove obsolete stages, branches, variables, schedules, and notifications.
- Update the runbook and ask a developer and an operator to follow it without assistance.
A CI/CD pipeline is ready to evolve when its controls are visible, its artifacts are traceable, and its failure modes are rehearsed. Treat the checklist as a living part of the delivery system, not as a one-time implementation document.