Jonatan Matajonmatum.com
conceptsnotesexperimentsessays
© 2026 Jonatan Mata. All rights reserved.v2.1.1
Concepts

CI/CD

Continuous Integration and Continuous Delivery/Deployment — practices that automate code integration, testing, and delivery to production. Foundation of modern software engineering.

evergreen#devops#automation#testing#dx

CI/CD are two complementary practices that automate the path from code commit to production. Together they eliminate "integration hell" and enable frequent releases with confidence.

Continuous Integration (CI)

Integrate code frequently (at least daily) to a shared branch, with automatic verification.

Principles

  1. Single repository — all code in one place
  2. Frequent commits — integrate small changes, don't accumulate
  3. Automated build — every commit triggers build + tests
  4. Fast tests — feedback in minutes, not hours
  5. Fix broken builds immediately — top priority

Typical CI pipeline

commit → build → lint → unit tests → integration tests → artifact
# GitHub Actions example
jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'pnpm'
      - run: pnpm install --frozen-lockfile
      - run: pnpm lint
      - run: pnpm test
      - run: pnpm build

Continuous Delivery vs Continuous Deployment

Two distinct concepts often confused:

Continuous Delivery

Code can go to production at any time — deploy is manual but the process is automated.

CI → auto staging → manual approval → production

Continuous Deployment

Code goes to production automatically if it passes all checks — no human intervention.

CI → auto staging → auto production
AspectDeliveryDeployment
Deploy to productionManual (button)Automatic
Typical frequencyDaily/weeklyMultiple times per day
RequiresReliable testsTests + feature flags + monitoring
RiskLowerRequires maturity

Complete pipeline

┌─────────────────────────────────────────────────────────────────┐
│                        CI/CD Pipeline                           │
├─────────┬─────────┬─────────┬─────────┬─────────┬──────────────┤
│  Build  │  Test   │  Scan   │ Package │ Deploy  │   Monitor    │
├─────────┼─────────┼─────────┼─────────┼─────────┼──────────────┤
│ compile │ unit    │ SAST    │ docker  │ staging │ logs         │
│ lint    │ integ   │ DAST    │ helm    │ canary  │ metrics      │
│ deps    │ e2e     │ secrets │ artifact│ prod    │ alerts       │
└─────────┴─────────┴─────────┴─────────┴─────────┴──────────────┘

Stages explained

  1. Build — compile, verify syntax, resolve dependencies
  2. Test — unit, integration, e2e (testing pyramid)
  3. Scan — static security (SAST), dynamic (DAST), secrets
  4. Package — create deployable artifact (Docker image, binary, bundle)
  5. Deploy — staging, canary, production
  6. Monitor — post-deploy observability

Deployment strategies

Blue-Green

Two identical environments. Switch traffic instantly.

         ┌─────────┐
Users ───┤ Router  ├──► Blue (v1) ← active
         └────┬────┘
              └──────► Green (v2) ← standby/new

Rollback: switch router back to Blue.

Canary

Send small percentage of traffic to new version.

Users ──┬── 95% ──► v1 (stable)
        └── 5%  ──► v2 (canary)

Gradually increase if metrics are good.

Rolling

Update instances one by one.

[v1] [v1] [v1] [v1]  →  [v2] [v1] [v1] [v1]  →  [v2] [v2] [v2] [v2]

Key metrics (DORA)

The four DevOps Research and Assessment metrics:

MetricEliteHighMediumLow
Deployment frequencyOn-demand (multiple/day)Daily-weeklyWeekly-monthlyMonthly+
Lead time for changes< 1 hour1 day - 1 week1 week - 1 month1 month+
Change failure rate0-15%16-30%31-45%46%+
Time to restore< 1 hour< 1 day< 1 week1 week+

Tools by category

CategoryTools
CI/CD PlatformsGitHub Actions, GitLab CI, Jenkins, CircleCI, Travis CI
Artifact RegistryDocker Hub, GitHub Packages, AWS ECR, Google Artifact Registry
InfrastructureTerraform, Pulumi, AWS CDK, CloudFormation
KubernetesArgoCD, Flux, Helm, Kustomize
TestingJest, Playwright, Cypress, k6
SecuritySnyk, Trivy, SonarQube, OWASP ZAP
MonitoringDatadog, Grafana, Prometheus, New Relic

Anti-patterns

  • Slow tests — if CI takes 30+ minutes, developers avoid integrating
  • Flaky tests — randomly failing tests destroy confidence
  • Manual deploy — if it requires manual steps, work piles up
  • No rollback — every deploy must be revertible in minutes
  • Secrets in code — use secret managers, never hardcode
  • Ignoring alerts — alert fatigue leads to ignoring real problems

Why it matters

CI/CD is the most important velocity multiplier in software engineering. Without CI, bugs accumulate and merges are painful. Without CD, approved code waits days or weeks to reach production. DORA metrics consistently demonstrate that teams with mature CI/CD deliver faster and with greater stability.

References

  • Continuous Delivery — Jez Humble & David Farley, 2010. The book that defined the practice.
  • Accelerate — Nicole Forsgren, Jez Humble & Gene Kim, 2018. Scientific research on DORA metrics and high performance.
  • The DevOps Handbook — Gene Kim et al., 2021. Practical implementation guide.
  • Google SRE Book — Google, 2016. Site Reliability Engineering practices including CI/CD.
  • Martin Fowler on CI — Martin Fowler, 2006. Seminal article that popularized CI.

Related content

  • GitHub

    Collaborative development platform built on Git. More than repository hosting — it's the central hub for code review, CI/CD, project management, and open source collaboration.

  • GitHub Flow

    Minimalist branching model designed for continuous deployment. Only two elements — main and feature branches — with PRs as the integration point and immediate deploy after merge.

  • DevOps

    Culture and set of practices that unify development (Dev) and operations (Ops) to deliver software with greater speed, quality, and reliability. It's not a role — it's a way of working.

  • Cloud Native

    Development approach leveraging cloud advantages: containers, microservices, immutable infrastructure, and declarative automation for scalable and resilient systems.

  • Code Quality

    Practices, tools, and metrics for maintaining readable, maintainable, testable, and defect-free code over time.

  • Container Registries

    Repositories for storing, versioning, and distributing container images, from public registries like Docker Hub to private registries like ECR.

  • PR Auto-Approver

    Serverless GitHub App that auto-approves pull requests after CI passes, with optional AI code review via Amazon Bedrock. Five repositories: TypeScript/Probot app, AWS Terraform module (Lambda + API Gateway + Secrets Manager + SQS DLQ), GitHub Terraform module (webhooks), deployment infra, and test repo.

  • Content Agent with Strands and Bedrock

    Three-agent system that automates the bilingual MDX content lifecycle: deterministic QA auditing, surgical fixes, and full upgrades — all orchestrated with Strands Agents, Claude Sonnet 4 on Amazon Bedrock, and GitHub Actions with a diamond workflow pattern.

  • Vulnerability Scanning

    Automated process of identifying known vulnerabilities in code, dependencies, containers, and infrastructure before they reach production.

  • Testing Strategies

    Approaches and testing levels for validating software works correctly, from unit tests to end-to-end tests and testing in production.

  • Terraform

    HashiCorp's Infrastructure as Code tool that enables defining, provisioning, and managing multi-cloud infrastructure through declarative HCL files.

  • Linting & Formatting

    Automated tools that verify style, detect potential errors, and format code consistently, eliminating style debates and improving quality.

  • Infrastructure as Code

    Practice of defining and managing infrastructure through versioned configuration files instead of manual processes. Foundation of modern operations automation.

  • Golden Paths

    Recommended, pre-configured paths for common development tasks incorporating best practices, reducing cognitive load for teams.

  • GitOps

    Operational practice using Git as single source of truth for infrastructure and configuration, with automatic reconciliation between desired and actual state.

  • GitHub Actions

    GitHub's native CI/CD platform. Declarative YAML workflows that automate build, test, deploy, and any development lifecycle task — directly from the repository.

  • Feature Flags

    Technique enabling activation or deactivation of features in production without deploying new code, enabling progressive releases and experimentation.

  • DevSecOps

    Integration of security practices throughout the software development lifecycle, automating security controls in the CI/CD pipeline.

  • DevOps Practices

    Set of technical and cultural practices that implement DevOps principles — from Infrastructure as Code to blameless post-mortems. The "how" behind the philosophy.

  • Developer Experience

    Discipline focused on optimizing developer productivity, satisfaction, and effectiveness through well-designed tools, processes, and environments.

  • Dev Containers

    Specification for defining reproducible development environments in containers, eliminating 'works on my machine' problems and accelerating onboarding.

  • AWS SAM

    AWS open-source framework for building serverless applications with simplified CloudFormation syntax, CLI for local development, and integrated deployment.

  • Accessibility

    Practice of designing and developing digital products usable by all people, including those with visual, auditory, motor, or cognitive disabilities.

Concepts