DevOps
CI/CD
Pipeline Stages

CI/CD Pipeline Stages

A CI/CD pipeline is a series of automated steps that take code from development to production. It acts as a "Fast Track" for delivering features and fixes.

The 4 Main Stages

A typical pipeline consists of four distinct stages, each with its own set of automated tasks.

1. Source Stage

Triggered when a developer initiates a code change (e.g., a git push or a Pull Request).

  • Tasks: Git commit, Code review, Versioning.

2. Build Stage

Takes the code from the source and prepares it for execution.

  • Tasks: Compile code, Resolve dependencies, Build Docker images, Create artifacts.

3. Test Stage

Ensures the code is reliable and meets quality standards before it moves further.

  • Tasks: Unit testing, Integration testing, Security scans (SAST/DAST), Performance tests.

4. Deploy Stage

Moves the tested and approved code to the target environment.

  • Tasks: Deploy to Staging, User Acceptance Testing (UAT), Deploy to Production.

[!TIP] Pipeline Visibility A good pipeline provides immediate visibility. If the "Build" fails, the "Test" never starts, and the developer is notified instantly. This "fail-fast" approach saves time and prevents broken code from reaching users.