Site Tools


ci-cd

CI/CD

CI/CD (continuous integration / continuous delivery) is the practice of automatically building, testing, and deploying software on every change. The goal is to keep the gap between “code written” and “code running in production” as small as possible, and to catch problems as close to the source as possible rather than discovering them weeks later during a manual release.

Continuous integration

Continuous integration means every branch or commit is automatically built and tested. The developer pushes a change; the CI system checks it out, compiles it, runs the test suite, and reports pass or fail within minutes. If the build breaks, the team knows immediately and can fix it before more changes pile on top.

The key discipline CI enforces is that the main branch is always in a releasable state. Without CI, “integration” is deferred until someone manually merges everything and discovers that six weeks of parallel changes conflict. With CI, integration happens continuously in small increments, and conflicts surface immediately.

A minimal CI pipeline for a C project might be:

# .github/workflows/ci.yml
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: make
      - run: make test

Continuous delivery

Continuous delivery extends CI: if the build passes, the artifact is automatically packaged and deployed to a staging environment, or even to production. The point is that deployment is not a manual ceremony that requires someone to zip a binary and upload it to a server — it happens as a consequence of a green build.

Some teams distinguish continuous delivery (deploy to staging automatically, deploy to production on approval) from continuous deployment (deploy to production automatically on every green build). Continuous deployment requires high confidence in the test suite and usually involves Canary release or Blue-green deployment strategies to limit blast radius.

What a pipeline looks like

A CI/CD pipeline is a sequence of stages:

push → lint → build → unit tests → integration tests → package → deploy to staging → (approval) → deploy to production

Each stage gates the next. A lint failure stops the build before running tests. A test failure stops deployment. This means problems are caught at the cheapest stage: a syntax error costs seconds to catch, not hours of manual testing.

Why it matters

Without a pipeline, integration risk accumulates silently. A small change that breaks an unrelated feature might not be discovered until the next manual release cycle, by which point other changes have been stacked on top, making the regression hard to isolate. CI/CD forces each change to stand on its own: it either passes the full suite or it does not land.

The secondary effect is that deployment becomes routine rather than an event. Teams that deploy many times per day develop much lower anxiety about deploying than teams that deploy once a quarter, because the consequence of a bad deploy is small: it is caught quickly and rolled back easily.

ci-cd.txt · Last modified: by 127.0.0.1