Basic Docs
ci-cddevops

CI/CD Pipeline

Continuous Integration and Deployment — automate your path from code to production.

What Is CI/CD?

CI/CD is the practice of automatically building, testing, and deploying code every time a change is pushed. It replaces manual, error-prone release processes with a repeatable pipeline that catches bugs early and ships faster.

Code
Build
Test
Deploy
iWhy it matters

Teams with mature CI/CD pipelines deploy multiple times per day with lower failure rates than teams that release manually on a fixed schedule.

CI vs CD

Continuous Integration focuses on merging and verifying code frequently. Continuous Delivery (and Deployment) extends that to automatically prepare — or push — every green build to production.

Continuous Integration (CI)Continuous Delivery/Deployment (CD)
Runs on every push / PRRuns after CI passes
Lint, test, buildPackage, release, deploy
Fast feedback to developersFast delivery to users
Detects merge conflicts earlyEliminates manual release steps
Outcome: a verified artifactOutcome: a live deployment

Pipeline Stages

A typical pipeline moves through four gates. Each gate must pass before the next starts — a failure stops the pipeline and notifies the team immediately.

1
Lint & Format
Static analysis catches style violations and obvious bugs without running the code. Fast — usually under 30 seconds.
2
Test
Unit and integration tests verify correctness. Aim for a suite that runs in under 5 minutes to keep the feedback loop tight.
3
Build
Compile, bundle, or containerise the application into a deployable artifact. Tag the artifact with the commit SHA for traceability.
4
Deploy
Push the artifact to staging first, then production. Use blue-green or canary strategies to reduce blast radius.
Pipeline Stage Flow
1
Code Push
Developer pushes to branch
2
Lint
Style and static analysis
3
Test
Unit and integration tests
4
Build
Compile and bundle artifact
5
Deploy Staging
Verify in staging environment
6
Deploy Prod
Release to production

Popular Tools

GitHub Actions
YAML workflows live alongside code. Huge marketplace of reusable actions. Free for public repos.
GitLab CI
Built into GitLab. Single .gitlab-ci.yml drives the entire pipeline. Strong caching and Docker-in-Docker support.
Jenkins
Self-hosted, highly extensible via plugins. Steep learning curve but unmatched flexibility for on-prem environments.
CircleCI
Cloud-native with fast spin-up via orbs. Parallelism and test splitting built in for large test suites.

Best Practices

Keep pipelines fast

Cache dependencies between runs. Parallelise independent jobs. A pipeline longer than 10 minutes discourages frequent commits.

Fail fast, fail loudly

Run the cheapest checks first (lint before tests, tests before build). Send notifications to the author — not a shared channel — so fixes happen immediately.

!Secrets management

Never hardcode credentials in pipeline files. Use your platform's secret store (GitHub Secrets, GitLab CI Variables) and rotate them regularly.

Typical Pipeline Execution
0 min — Code Push
Developer pushes commit to feature branch
1 min — Lint
Biome / ESLint completes static analysis
3 min — Test
Unit and integration test suite passes
5 min — Build
Application bundled and artifact tagged with commit SHA
8 min — Deploy
Artifact promoted to staging, then production
Built: 4/8/2026, 12:01:11 PM