A reliable CI/CD pipeline helps DevOps teams ship changes faster with less risk. This guide covers the core pipeline stages, how common CI/CD platforms differ, and baseline configuration patterns you can use as a starting point.
Originally published on 2014-07-11; fully revised and updated.
What CI/CD solves in day-to-day DevOps work
CI/CD (Continuous Integration and Continuous Delivery/Deployment) turns software delivery into a repeatable system instead of a manual sequence of one-off steps. In practice, it gives teams consistent quality checks, traceable releases, and faster feedback on failed changes.
- Continuous Integration (CI): automatically validates each change (linting, tests, builds).
- Continuous Delivery: keeps artifacts deployable and ready for release.
- Continuous Deployment: automatically promotes approved changes to production.
If you are standardizing delivery, this is the minimum structure to align engineering, QA, security, and operations around one release path.
Reference workflow: from commit to production
The workflow below represents a common baseline for application teams. You can add or remove gates depending on compliance, risk, and release frequency.
flowchart TD
A[Developer pushes commit] --> B[CI pipeline starts]
B --> C[Run lint and unit tests]
C --> D{Checks pass}
D -- No --> E[Fail pipeline and notify team]
D -- Yes --> F[Build artifact image]
F --> G[Security scan artifact]
G --> H[Deploy to staging]
H --> I[Run smoke tests]
I --> J{Release approval}
J -- No --> K[Hold release and investigate]
J -- Yes --> L[Deploy to production]
Comparing common CI/CD platforms
Most teams choose based on ecosystem fit, governance needs, and operational overhead rather than raw feature lists.
| Tool | Strengths | Trade-offs | Best fit |
|---|---|---|---|
| GitHub Actions | Native integration with GitHub repositories and pull requests | Complex workflows can become hard to maintain without conventions | Teams already centered on GitHub |
| GitLab CI/CD | Single platform for source control, CI/CD, and related DevOps workflows | May require platform-specific practices for advanced pipelines | Teams that want an integrated DevOps platform |
| Jenkins | Highly extensible and flexible for custom pipelines | Higher maintenance and plugin governance overhead | Organizations needing deep customization |
Official documentation: GitHub Actions docs, GitLab CI/CD docs, and Jenkins docs.
Starter pipeline example
The example below shows a minimal CI workflow for a Node.js service in GitHub Actions. It validates code and produces a Docker image tag for the current commit.
name: ci
on:
push:
branches:
- main
pull_request:
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build container image
run: docker build -t registry.example.com/myapp:${{ github.sha }} .Code language: HTTP (http)
Typical production deployment command sequence for Kubernetes:
kubectl set image deployment/api api=registry.example.com/myapp:${GIT_SHA} -n production
kubectl rollout status deployment/api -n productionCode language: JavaScript (javascript)
Deployment strategy options
| Strategy | How it works | Risk profile | Operational complexity |
|---|---|---|---|
| Rolling update | Replaces instances gradually | Moderate risk, easier rollback than one-shot deploys | Low to medium |
| Blue/green | Switches traffic from old to new environment | Lower release risk with fast cutover rollback | Medium |
| Canary | Sends a small percentage of traffic to new version first | Lower risk for high-impact systems | Medium to high |
Best practices for resilient pipelines
- Keep pipelines fast: run quick checks first and fail early.
- Treat pipeline definitions as code and review them through pull requests.
- Separate build, test, and deploy responsibilities into clear stages.
- Store secrets in a dedicated secret manager or CI secret store, never in source control.
- Use immutable artifact tags so every deployment is traceable.
- Require health checks and rollback criteria before production promotion.
A strong CI/CD pipeline is less about one tool and more about clear gates, repeatable automation, and controlled promotion between environments.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals