Skip to content

CI/CD explained: continuous integration, delivery and deployment, a real pipeline, deploy strategies and DORA

The difference between continuous integration, continuous delivery and continuous deployment, a real pipeline, rolling, blue-green, canary and feature flags, the five DORA metrics and how to secure the pipeline.

Ramon Gomes 12 min read Level: Beginner

Also available in: Español, Français, Português

You've lived through deploy Friday: three weeks of changes bundled together, a merge full of conflicts, someone uploading files over FTP, and the whole weekend on call. CI/CD exists so that deploying stops being an event and becomes routine: small, frequent and boring.

This article untangles the concepts (people mix them up all the time), walks through a real pipeline, the deploy strategies, the metrics that matter and the security precautions that became mandatory after 2025. I checked the facts on November 21, 2026.

Factory assembly line with parts moving along a conveyor belt through inspection stations, with a green light on above each station
Each station checks one thing. If one turns red, the belt stops.

CI: Integrate Small and Often

Martin Fowler, who popularized the term, revised his classic article on continuous integration in January 2024. The definition is about behavior: each member of the team merges their changes into the codebase, together with their colleagues' changes, at least daily.

Two consequences that surprise people:

  • CI isn't the tool. Fowler warns that "we shouldn't confuse a tool for the practice." Running tests on GitHub Actions against branches that live for three weeks isn't continuous integration; he calls it "semi-integration."
  • CI and long-lived feature branches are opposite approaches. The exception is a branch that lives less than a day, just for code review.

What the practice asks for, summing up the article's 11 sections: everything under version control, an automated self-testing build, everyone integrating every day, every integration triggering a build, broken builds fixed immediately, and a fast build.

Think of a restaurant kitchen that washes dishes while it cooks. Whoever lets them pile up spends the end of the shift in a scrubbing marathon. A three-week branch is the pile of dirty dishes.

Side by side animation: on the left, short branches leaving a trunk and coming back several times a day; on the right, long develop, release and hotfix branches drifting apart for weeks and crossing in a merge full of conflicts marked in red
Short branches come back easily. Long branches come back with conflicts.

That explains the popularity of trunk-based development: everyone works on a single trunk, with short branches only for review. And GitFlow's own creator, Vincent Driessen, added a note to the original post in 2020: "If your team is doing continuous delivery of software, I would suggest to adopt a much simpler workflow (like GitHub flow) instead of trying to shoehorn git-flow into your team."

Continuous Delivery and Continuous Deployment

Both terms share the "CD" acronym, and the difference is a button.

Continuous delivery Continuous deployment
What it guarantees The software can go to production at any time Every change that passes the pipeline goes to production on its own
Who picks the moment The team or the business The pipeline
Prerequisite A reliable test pipeline Working continuous delivery

A picture helps: with continuous delivery, the plane is fueled and inspected at the gate, and the tower decides when it takes off. With continuous deployment, it takes off as soon as the checklist is done.

The central concept, from the book Continuous Delivery by Jez Humble and David Farley (2010), is the deployment pipeline: each commit becomes a package that moves through increasingly broad verification stages.

Two CI/CD conveyor paths: a commit passes build, unit tests, integration, staging and production; on the second path, an integration failure blocks the next stages and protects production.
The package only moves on if the previous station turned green.

The first stage (build, unit tests, lint) should take a few minutes, so developers get feedback while they still remember what they did. The slower ones (integration, E2ETest that opens the app in a real browser and replays a user path, from the click to the server response, to check the whole flow works., performance) come later.

A Real Pipeline

GitHub's official Node example, updated to current versions:

yaml
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read            # the minimum; each job asks for more if it needs it

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v7
        with:
          node-version: '24.x'
          cache: 'npm'      # reuses dependencies across runs
      - run: npm ci
      - run: npm run lint
      - run: npm test
      - run: npm run build

To test against several versions at once, matrix creates one job per combination:

yaml
strategy:
  matrix:
    node-version: ['22.x', '24.x']

This portfolio, for example, uses Azure Pipelines: build, tests and a Docker image on every push to main, and the deploy only happens if everything passed. With Docker, the same package tested in CI is the one that runs in production.

Deploy Strategies

Getting the new version live without taking anything down, and with an easy way back.

Rolling Update

The Kubernetes default: old instances are replaced by new ones gradually. By default, up to 25% can be unavailable and up to 25% extra can be created during the swap.

Four v2 server racks under a load balancer, with the extra slot empty; maxUnavailable at 25% allows at most one instance down and maxSurge at 25% allows at most one extra.
One at a time, never taking them all down.
yaml
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%

If it goes wrong, kubectl rollout undo goes back to the previous version.

Blue-green

Two identical production environments. One is live (blue), the other gets the new version (green). Once it's tested, the router switches the traffic. If something goes wrong, you switch it back.

Users connect to the router, whose arrow points only to the blue environment on v1. The green environment on v2 shows error 500; a clock indicates the return to blue in 1 second, without a new deploy.
Switch the traffic over. And switch it back if you need to.

The catch is the database, since there's only one. Fowler's advice: "The trick is to separate the deployment of schema changes from application upgrades." First a schema that works with both versions, then the new version.

Canary

The name comes from the canary miners used to carry to detect gas. The new version goes to a small slice of users first, and the team watches the metrics before releasing it to everyone.

Three canary panels: v2 receives 5% of users; errors rise and 100% of traffic returns to v1; stable v2.1 advances through 5%, 25%, 50% and 100%, shown as bars.
A few users first. If it breaks, only they see it.

Canary requires observability: without per-version metrics, there's no way to know whether the canary is fine.

Feature Flags

The technique that changes the game the most. New code goes to production turned off, and the feature is turned on later, through configuration, for some users or for everyone.

ts
if (await flags.getBooleanValue('new-checkout', false, { userId })) {
  return newCheckout(order);
}
return currentCheckout(order);

This separates deploy (the code is there) from release (the user sees it). It's also what makes trunk-based development possible: unfinished code goes into the trunk, protected by the flag. OpenFeature, a CNCF project, offers a standard APIContract that defines how one program asks another for data or actions: which endpoints to call, what to send and what comes back. On the web, usually HTTP with JSON. so you don't get locked into a vendor.

Pete Hodgson's warning, in the reference article on the subject: "Feature FlagsConfigurable switch that turns a feature on or off without shipping new code, so you can roll out gradually, test with a group or roll back fast. have a tendency to multiply rapidly." Treat each one as debt, with a removal date.

The DORA Metrics

The DORA research program has spent more than ten years studying what sets high-performing delivery teams apart. The most cited finding, from 2015: the research "debunked the myth that speed comes at the expense of stability." The teams that ship faster also break less.

The five current metrics:

Group Metric What it measures
Throughput Change lead time From commit to production
Throughput Deployment frequency How many deploys per period
Throughput Failed deployment recovery time How long it takes to recover
Instability Change fail rate Share of deploys that need a rollback or hotfix
Instability Deployment rework rate Share of unplanned deploys, caused by an incident

The fifth metric was added in 2024. And a detail that often gets repeated wrong: reliability isn't the "fifth metric"; DORA itself says the 2021 report was mistaken in calling it that.

In the 2025 report, with almost 5,000 professionals, 16.2% said they deploy on demand, several times a day, and 31.5% between once a week and once a month. The report recommends comparing your service with itself over time, not with other companies.

Pipeline Security

The pipeline holds the production keys, which makes it a target. In March 2025, the tj-actions/changed-files action, used by thousands of repositories, was compromised: its version tags were pointed to a malicious commit that printed secrets into the logs. CISA issued an alert, and the guidance was to rotate anything that might have leaked.

The v45 label is on the attacker’s commit e9f8d7. Workflow A uses @v45 and shows leaked secrets in a masked log and an open padlock. Workflow B uses @a1b2c3, stays on the legitimate commit and shows npm test ok and a closed padlock.
A tag can move. A SHA can't.

The defenses, all from GitHub's documentation:

  • Pin actions by SHA, not by tag: uses: some/action@8f4b7f8.... Since October 2026, GitHub also offers the workflow lockfile (actions.lock), which the documentation describes as the strongest protection available.
  • Least privilege for GITHUB_TOKEN: read-only by default, and each job asks for what it needs.
  • OIDC instead of long-lived secrets: instead of storing a cloud key as a secret, the pipeline gets a token that's valid only for that job.
yaml
permissions:
  id-token: write   # required to request the OIDC token
  contents: read

The article on npm supply chain attacks digs into the other side of the same problem: the dependencies the pipeline installs.

What It Costs

Tool Free plan (private repository)
GitHub Actions $12 a month in included usage (about 2,000 standard Linux minutes); free for public repositories
GitLab CI 400 minutes a month
Azure Pipelines 1 parallel job, 1,800 minutes a month (you have to enable it by linking an Azure subscription)
CircleCI 30,000 credits a month
Jenkins Open source, you host it

Since January 2026, GitHub expresses included usage in dollars, not minutes. Self-hosted runners don't consume that balance, and the fee announced for them has been postponed with no new date so far.

And for Kubernetes users there's the GitOps model, with tools like Argo CD: the desired state lives in Git, and an agent in the cluster pulls and reconciles on its own, instead of the pipeline pushing the deploy.

Cartoon of a restaurant kitchen at the end of the shift with a giant mountain of dirty dishes and three discouraged cooks in aprons, while in the kitchen next door a cook washes each plate right after using it and is already heading home
Integrate small and often, or scrub all Friday night.

Quick check

1. A team runs tests on GitHub Actions against branches that live for three weeks. According to Fowler, is that continuous integration?
Show answer

Answer: No, because the code isn't integrated into the mainline at least daily

CI is the practice of integrating often, not the tool.

2. What's the difference between continuous delivery and continuous deployment?
Show answer

Answer: With delivery, someone decides when to ship; with deployment, every approved change goes out on its own

Continuous deployment assumes continuous delivery is already working.

3. Why pin an action by SHA instead of a tag?
Show answer

Answer: Because a tag can be moved to another commit, and a SHA can't

That's how the attack on tj-actions/changed-files worked.

Frequently Asked Questions

Do I need Kubernetes to do CD?

No. The deployment pipeline idea predates Kubernetes and works for anything, from web apps to firmware. A server with Docker and a deploy script is already enough for continuous delivery.

How many tests do I need to get started?

Enough to trust that the core hasn't broken. Start with tests for the critical flows and a build that fails loudly. The back-end testing guide helps you choose.

Is deploying on Friday forbidden?

If each deploy is small, tested and easy to roll back, Friday is just another day. If the deploy is big and risky, the day isn't the problem.

Roll back or fix forward?

Both are valid. Rolling back is faster when the strategy allows it (canary, blue-green). Fixing forward is the way out when the change touched data that won't revert on its own.

GitHub Actions, GitLab CI or Azure Pipelines?

Use the one that lives next to your code. The concepts in this article apply to all of them.

References

Checked on November 21, 2026:

Source: https://ramongomessilva.com.br/blog/ci-cd-explained · Accessed on December 03, 2026

Share Share on LinkedIn Share on X
Cite this article

Ready-made reference, with today as the access date.

ABNT

Brazilian standard (NBR 6023). Use it in theses and academic papers submitted in Brazil.

GOMES, Ramon. CI/CD explained: continuous integration, delivery and deployment, a real pipeline, deploy strategies and DORA. Ramon Gomes, 2 dez. 2026. Disponível em: https://ramongomessilva.com.br/blog/ci-cd-explained. Acesso em: 3 dez. 2026.

APA

American Psychological Association style. Common in scientific papers and journals, especially in the social, behavioral and health sciences.

Gomes, R. (2026, December 2). CI/CD explained: continuous integration, delivery and deployment, a real pipeline, deploy strategies and DORA. Ramon Gomes. https://ramongomessilva.com.br/blog/ci-cd-explained

BibTeX

Format for LaTeX users (Overleaf, for example). Paste it into your .bib file or import it into Zotero or Mendeley.

@online{gomes2026cicdexplained,
  author = {Gomes, Ramon},
  title = {{CI/CD explained: continuous integration, delivery and deployment, a real pipeline, deploy strategies and DORA}},
  organization = {Ramon Gomes},
  year = {2026},
  month = dec,
  date = {2026-12-02},
  url = {https://ramongomessilva.com.br/blog/ci-cd-explained},
  urldate = {2026-12-03}
}
Found a mistake?

Wrong fact, broken link, outdated information: tell me and I will fix it.

10 to 2,000 characters. If you can, point to the right source.

Only so I can reply. It never shows on any page of the site.

Written by

Ramon Gomes

Software Engineer

Full stack software engineer. I like taking a messy problem, listening to the people who live with it and shipping something that holds up day to day. These days I split my time between my own products, applied AI and client work.

Available for projects

Need Something Like This Built?

I build websites, systems, apps and AI automations, from design to deploy. Tell me what you need or see what I offer.

Related Articles