A dependable CI/CD pipeline turns a code change into a controlled, observable release. This guide provides a reusable checklist for planning pipeline stages, defining quality gates, managing artifacts and secrets, selecting deployment strategies, and maintaining the workflow as your application changes.
Overview
A CI/CD pipeline should make the path from commit to production clear, repeatable, and safe to interrupt. Continuous integration focuses on validating changes as they enter the shared codebase. Continuous delivery extends that validation into a release process that can promote a known artifact through environments. Continuous deployment goes further by automatically releasing changes when defined conditions are met.
The right design depends on application risk, team size, infrastructure, regulatory requirements, and the ability to observe and reverse a release. A small web service may need a short pipeline with tests, dependency checks, an image build, and a staged deployment. A system with sensitive data or complex infrastructure may require additional approvals, integration environments, migration controls, and a formal rollback plan.
Keep the pipeline focused on evidence. Each stage should answer a useful question: Does the code compile? Do automated tests pass? Is the dependency or container risk acceptable? Can the exact artifact be identified? Did the deployment become healthy? If a stage cannot support a decision, simplify it, move it elsewhere, or document why it exists.
For a broader operational workflow, use this practical guide to building a reliable CI/CD pipeline. If your team is deciding between repository-driven environment changes and a more traditional release process, compare the tradeoffs in GitOps and traditional CI/CD workflows.
Checklist by scenario
For every pull request or commit
- Check out the intended revision and record its commit identifier in the pipeline output.
- Install dependencies using a lockfile or another reproducible method where the ecosystem supports it.
- Run formatting, linting, type checks, and unit tests appropriate to the project.
- Build the application or package so compilation and bundling errors appear before deployment.
- Keep credentials out of logs, source control, test fixtures, and generated artifacts.
- Publish clear failure output, including the stage, command, and relevant diagnostic information.
For a shared integration branch
- Run tests that depend on databases, queues, APIs, or other services in a controlled environment.
- Validate database schema changes against a representative, non-production setup.
- Run security checks for dependencies, source code, container images, and infrastructure definitions where they are relevant.
- Build one versioned artifact instead of rebuilding different binaries or images for each environment.
- Store test reports and scan results long enough for the team to investigate recurring failures.
- Make branch protection or merge rules reflect the checks that genuinely protect the mainline.
For environment promotion
- Promote the same immutable artifact from test to staging and then to production.
- Separate application configuration from the artifact, and define which values belong to each environment.
- Use scoped credentials for each environment and grant the pipeline only the permissions it needs.
- Define who or what can approve production promotion, and record the decision with the release.
- Run smoke tests after deployment, such as health checks, authentication checks, and a representative read-only request.
- Monitor error rates, latency, resource health, and key business or user-facing signals before declaring success.
For blue-green or canary releases
- Confirm that the application can run alongside the previous version without incompatible contracts.
- Define how traffic moves to the new version and how it returns to the previous version.
- Choose measurable promotion criteria before the release begins rather than relying on impressions.
- Limit canary exposure initially when the platform and workload support gradual traffic changes.
- Verify logs, traces, alerts, and dashboards for the new version specifically.
- Document the stop and rollback commands in an accessible runbook.
Deployment strategy should follow reversibility. A rolling deployment may be adequate for compatible services, while blue-green deployment can make traffic switching simpler at the cost of additional capacity. A canary strategy is useful when gradual exposure and strong observability are available. None of these strategies replaces testing or a rollback decision.
What to double-check
Quality gates
Every blocking gate should have an owner and a reason. A useful gate prevents a known failure mode: broken tests, an invalid package, an unsafe migration, a missing approval, or an unhealthy deployment. Avoid making every warning block a release without considering its signal quality. Noisy gates encourage bypasses, which weakens the process.
Artifacts and traceability
A release should answer what changed, how it was built, which tests ran, and which artifact was deployed. Tag artifacts with a commit identifier or equivalent immutable version. Retain the relationship between source revision, pipeline run, artifact, environment, and deployment result. This record reduces investigation time when a release needs to be reviewed or reversed.
Secrets and environment configuration
Store secrets in an appropriate secret-management system rather than in repository files or plain pipeline variables. Mask values in logs, restrict access by job and environment, and define a rotation process. Check that a secret is not accidentally exposed through command arguments, debug output, crash reports, or uploaded test artifacts. For practical guidance, review secure environment variable setup and rotation.
Database changes
Application and database deployments can fail independently. Prefer migration patterns that support compatibility between the old and new application versions when rolling back is possible. Consider whether a migration is reversible, whether it can run within the deployment window, and whether it changes data in a way that a code rollback cannot undo. See the guide to safe database migrations during deployments before coupling schema changes to an urgent release.
Recovery and communication
Do not treat rollback as a theoretical feature. Specify the trigger, decision-maker, command, expected duration, and post-rollback checks. If rollback cannot safely undo the change, define the forward-fix procedure instead. Keep the deployment runbook close to the pipeline and make its instructions executable by the person on call. A separate incident response checklist for failed deployments can help structure escalation and recovery.
Common mistakes
- Rebuilding for every environment: This can produce small but meaningful differences between what was tested and what reached production. Build once, then promote the identified artifact.
- Putting all checks in one job: A monolithic job makes failures harder to diagnose and often prevents useful parallelism. Separate stages by purpose and preserve their outputs.
- Using production as the first realistic test: Add integration, staging, or controlled pre-production checks where they provide meaningful coverage.
- Allowing permanent manual steps: Approval can be valuable for high-risk changes, but unexplained handoffs create delay and conceal unclear ownership. Document what the approver is expected to verify.
- Ignoring deployment compatibility: New code may encounter old processes, and old code may encounter new schemas during a rolling release. Test that transition explicitly.
- Skipping post-deployment verification: A successful process exit does not prove that users can complete important actions. Use a focused verification checklist for websites and APIs.
- Failing to maintain the pipeline: Outdated actions, images, plugins, base runtimes, and permissions become operational risk. Treat pipeline code as production code.
For a compact operational sequence, use the CI/CD deployment checklist and pair it with a post-deployment verification checklist.
When to revisit
Review the pipeline before seasonal planning cycles, after a significant change in application architecture, and whenever the team adopts a new repository, cloud platform, container runtime, testing framework, or deployment tool. Revisit it after an incident, a near miss, a long-running queue, repeated flaky tests, or a release that required an undocumented manual workaround.
At each review, walk through one change from commit to production and ask:
- Can the team identify the exact artifact and source revision?
- Do the gates catch the failures that matter without creating avoidable noise?
- Are secrets, permissions, and environment values still appropriately scoped?
- Can an operator stop, verify, and recover a release without searching across several systems?
- Do deployment dashboards show the signals needed for a promotion or rollback decision?
- Are pipeline dependencies and runner environments maintained like other production components?
Record the answers as small, owned improvements rather than waiting for a complete redesign. Update the pipeline, runbook, approval rules, and monitoring together when the workflow changes. A CI/CD pipeline remains useful when it reflects how the system is actually built and operated—not merely how the team intended it to work when the pipeline was first created.