Skip to content

πŸ”„ CI/CD Pipelines ​

Automating build, test, and deployment for reliable delivery.

CI vs CD ​

  • Continuous Integration (CI) β€” Automatically build and test on every push
  • Continuous Delivery (CD) β€” Automatically prepare deployable artifacts
  • Continuous Deployment β€” Automatically deploy to production

Pipeline stages ​

Code Push β†’ Lint β†’ Build β†’ Unit Tests β†’ Integration Tests β†’ Deploy Staging β†’ E2E Tests β†’ Deploy Production

CI pipeline essentials ​

  • [ ] Lint and format check
  • [ ] Build the application
  • [ ] Run unit tests
  • [ ] Run integration tests
  • [ ] Security scan (dependencies + code)
  • [ ] Build Docker image (if applicable)
  • [ ] Publish artifacts

CD pipeline essentials ​

  • [ ] Deploy to staging automatically
  • [ ] Run smoke tests on staging
  • [ ] Manual approval gate (or auto-deploy)
  • [ ] Deploy to production
  • [ ] Health check post-deploy
  • [ ] Notify team of deployment

Deployment strategies ​

StrategyDowntimeRiskComplexity
RollingNoneMediumLow
Blue-GreenNoneLowMedium
CanaryNoneLowHigh
Feature flagsNoneLowMedium
RecreateYesHighLow

Best practices ​

  • Pipeline must be fast β€” under 10 minutes for CI
  • Fail fast β€” run cheapest checks first (lint before tests)
  • Cache dependencies between runs
  • Use the same build artifact across all environments
  • Store secrets in vault, never in pipeline files
  • Make pipelines reproducible β€” pin dependency versions
  • Monitor pipeline success rate and duration

Common tools ​

ToolType
GitHub ActionsCI/CD
GitLab CICI/CD
DockerContainerization
TerraformInfrastructure as Code
ArgoCDGitOps deployment
Renovate / DependabotDependency updates

Pergame Knowledge Base