Summary for leaders: CI/CD is the automated path every code change takes from the moment it is committed to the moment it reaches users. CI (continuous integration) means every change is built and tested automatically. CD means either continuous delivery, where every version that passes the tests is ready to release at any moment, or continuous deployment, where that version is released with no human in the loop. The real value of CI/CD is not speed; it is that every release carries less risk. Our verdict: every team running software in production, even a team of three, needs a simple pipeline with tests, a single build and a way back. And zero-downtime deployment depends less on tooling than on whether the application and the database are ready for it.

In many teams, a release is still an event: one specific person, usually outside working hours, connects to the server, pulls the code, restarts the service and waits to see whether anything breaks. The outcome is familiar. The team is afraid of releasing, changes pile up, each release gets bigger and riskier, and the fear grows.

CI/CD reverses that cycle. This article is for technical leaders and engineers who want to know exactly what CI/CD is, where and how to build their first pipeline, and what, beyond the pipeline itself, has to be right to reach zero-downtime deployment.

What is CI/CD?

CI/CD is the name for a set of practices that make the path from code to production automated, repeatable and reliable. The name hides three concepts behind two pairs of letters, and most misunderstandings start right there.

Concept What it means What it produces
CI: continuous integration Every change is merged into the main branch early and often, and every merge is built and tested automatically A main branch that is always healthy
CD: continuous delivery Every change that passed CI goes along an automated path to the point where releasing it is only a decision A version that is ready to release at any moment
CD: continuous deployment The same path without a manual gate; every change that passes all checks reaches production automatically Several releases a day with no human intervention
CI, continuous delivery and continuous deployment: three stages of one path, and where the human decision gate sits
CI, continuous delivery and continuous deployment: three stages of one path, and where the human decision gate sits

CI in practice: integrate early, test automatically, keep the build green

CI is a team habit before it is a tool. In his reference article on continuous integration, Martin Fowler defines it this way: every member of the team merges their changes into the main branch at least daily, and every merge is verified by an automated build that also runs the tests. Several principles follow from that definition:

Continuous delivery or continuous deployment?

The difference is in one place: whether a human makes a decision before production. DORA's research also stresses that the two are often confused, and that the goal of continuous delivery is to reduce risk, not increase it.

For most teams, continuous delivery is the right first goal. Every version is built, tested and deployed to staging, and releasing to production takes one click. Continuous deployment makes sense once test coverage, monitoring and automatic rollback have reached the point where the team trusts the pipeline more than a manual review. In products with a legal or contractual requirement to approve releases, that manual gate stays, and that is fine; what matters is that everything before and after that click is automated.

What is a pipeline, and what stages does it have?

A pipeline is the automated path that runs CI/CD: a chain of stages that starts with every commit, where each stage runs only if the previous one succeeded. Its exact shape depends on the product, but the skeleton of a healthy pipeline usually looks like this:

The stages of a healthy pipeline: from commit and tests to building an artifact, deploying to staging, an approval gate, deploying to production and monitoring after release
The stages of a healthy pipeline: from commit and tests to building an artifact, deploying to staging, an approval gate, deploying to production and monitoring after release
  1. Fast checks. Linting, formatting checks and unit tests; things that answer in a minute or two and catch most mistakes right there.
  2. Build and artifact. The runnable output is built, today usually a container image, tagged with the commit ID and stored in a registry.
  3. Deeper tests. Integration tests against real or simulated databases and services, and for business-critical paths, end-to-end tests.
  4. Security and quality checks. Scanning code, dependencies and the image for known vulnerabilities.
  5. Deploy to staging. The same artifact is deployed to an environment that resembles production.
  6. Approval gate. In continuous delivery, a human decision; in continuous deployment, a set of automated checks.
  7. Deploy to production. Using one of the zero-downtime methods described below.
  8. Post-release monitoring. Error rates and response times are watched for the first few minutes after release; if they get worse, roll back.

One principle in this chain matters more than the rest: build once and deploy the same thing everywhere. The artifact that was tested on staging must be exactly what goes to production, not a fresh build from the same code. Every new build is a new chance for something to differ: a dependency that got a new version in the meantime, a base image that changed, or a setting that exists in only one of the environments. Environments should differ only in configuration and secrets, not in the artifact itself.

Learning CI/CD: your first pipeline, step by step

Suppose deployment is manual today: someone SSHes into the server and runs a few commands. You do not have to change everything at once to get to your first pipeline. In practice, this order has worked best:

Step 1: Write down the manual process. Before automating anything, write down exactly what today's deployment involves, including all the small details only one person knows. Often this list is the first time the whole process has been written down anywhere.

Step 2: Put everything in Git. Not just the code: the Dockerfile, configuration files without secrets, deployment scripts and the pipeline definition itself. A pipeline that was assembled by clicking through a tool's interface and is not in Git has the same problem as manual deployment, just in a different place.

Step 3: Automate build and test. Your first pipeline should do just two things: build the code on every commit and run the existing tests. If you have no tests, start with a few for the critical paths, such as sign-in, payment or placing an order.

Step 4: Build an artifact and keep it. Store the build output in a registry, tagged with the commit ID, and do not delete previous versions. This is where your way back comes from.

Step 5: Automate deployment to staging. Every merge to main is deployed to staging automatically. This step usually surfaces the most hidden problems: settings that existed only on the production server, or a dependency that was installed by hand.

Step 6: Release production with one click. The same artifact, the same script, one button. From this moment on, nobody SSHes into a server to release.

Step 7: Practice the way back. Rolling back to the previous version should also be a pipeline run, and it should actually be done at least once, on a day that is not a crisis.

A simple version of this pipeline in GitLab CI looks like this:

stages: [test, build, deploy]

variables:
  IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA

test:
  stage: test
  image: python:3.12
  script:
    - pip install -r requirements.txt
    - pytest

build:
  stage: build
  image: docker:27
  services: [docker:27-dind]
  script:
    - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
    - docker build -t "$IMAGE" .
    - docker push "$IMAGE"

deploy_staging:
  stage: deploy
  script:
    - ./deploy.sh staging "$IMAGE"
  environment: staging
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

deploy_production:
  stage: deploy
  needs: [deploy_staging]
  script:
    - ./deploy.sh production "$IMAGE"
  environment: production
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual

In this file, tests run on every commit, the image is built once and tagged with the commit ID, main goes to staging automatically, and production is released with a manual click and only after staging. deploy.sh can be anything: a few lines that bring up the new image on a server with Docker Compose, or a change to the image version in Kubernetes. What matters is that staging and production deployments follow exactly the same path.

Jenkins and GitHub Actions implement the same concepts in their own language. Which tool suits your team depends on where your code is hosted, where your runners run and what the team is comfortable with; we will compare the three in a separate article.

Zero-downtime deployment: what it really takes

Zero-downtime deployment means users see no error or interruption while a new version is released. Most articles go straight from here to the methods: rolling, blue-green, canary. But in our experience, most releases that were "supposed to be zero-downtime" and were not did not fail because of the choice of method; they failed because of something that is a prerequisite for every method.

Prerequisites: the application has to be ready

Deployment methods

Method How it works Advantage Cost and risk
Rolling Instances are replaced one at a time or in batches Simple, no extra resources, the Kubernetes default Rollback is gradual too; two versions run side by side for a while
Blue-green The new version comes up in full next to the current one, and traffic switches over at once Instant rollback by switching traffic back Double the resources during the release; a shared database is still an issue
Canary The new version first gets a small share of traffic, and more if it stays healthy The least damage if the version is broken Needs precise monitoring and clear criteria for continuing or rolling back
Feature flag New code is released switched off, and turned on separately from deployment Releasing code is decoupled from releasing a feature Forgotten flags turn into technical debt
Four zero-downtime deployment methods: rolling, blue-green, canary and feature flags, and how traffic moves in each
Four zero-downtime deployment methods: rolling, blue-green, canary and feature flags, and how traffic moves in each

For most teams, the right starting point is rolling with a real health check and one-click rollback. Canary is worth it when you have enough traffic to see a statistical difference and monitoring that can show it. Feature flags complement all of these: when turning a feature on is separate from releasing its code, unfinished code can be merged to main every day without reaching users, which is exactly what CI needs.

We have written up a real path from manual deployment to these methods in From terrifying deploys to zero-downtime.

Database migrations: where "zero downtime" usually breaks

Suppose you rename the column name to full_name and run the migration in the same release that ships the new code. During the few minutes the rolling update takes, the old instances are still looking for name and throwing errors. The pipeline is fully automated and the release method was chosen correctly, but users saw an outage.

The fix is to split every incompatible database change into several separate releases, a pattern known as expand and contract, or parallel change:

The expand-and-contract pattern for zero-downtime database migrations: add the new column, write to both, backfill, read from the new column and drop the old one
The expand-and-contract pattern for zero-downtime database migrations: add the new column, write to both, backfill, read from the new column and drop the old one
  1. Expand: the full_name column is added. The old code does not see it at all, so nothing breaks.
  2. Write to both: the new version of the application writes to both columns and still reads from name.
  3. Backfill: existing data is copied to the new column in small batches, outside the path of user requests.
  4. Switch reads: the next version reads from full_name.
  5. Contract: once no version uses name, the old column is dropped.

Five steps to rename a column sounds like a lot, and for a table with a few hundred rows it may be. But for the main table of a live product, it is the only way in which every single release stays reversible. Two supporting rules belong alongside it: a migration always runs separately from, and before, the code that depends on it, and no manual change is ever made to the production database outside the migration path.

Rolling back, or fixing forward

Every release needs a way back, and that way back should be as automated as the release itself. If artifacts are kept, rolling back means redeploying the previous version: seconds to minutes, not a manual operation in the middle of the night.

But rolling back is not always the answer. If a migration dropped a column or reshaped data, reverting the code does not bring it back. That is why the expand-and-contract pattern matters: every step until the last one is reversible. When rolling back is not possible, the team has to be able to ship a fix forward quickly, and that is only possible when the pipeline is fast and the team trusts it.

Security and quality in the pipeline

The pipeline is the best place for checks everyone knows are necessary and nobody has time to do by hand. Three basic checks:

In our own pipelines, SonarQube and Trivy act as the quality gate, and a change that does not pass them is not released. One practical point: do not make these gates strict from day one. Let them report first, then block releases only for severe findings, and tighten them gradually. A gate that turns every pipeline red on day one gets bypassed by the team itself a few days later. More details are on our security and DevSecOps page.

Common mistakes

How it works in our own team

Dropp Tempo's release path runs on self-hosted GitLab. Build and test happen in GitLab CI, images and dependencies come from an internal cache built on Harbor and Nexus, and every change passes the SonarQube and Trivy gate. Deployment is separate from the build: ArgoCD keeps the Kubernetes cluster in sync with the state defined in Git, so every deployment is a commit and so is every rollback. This approach is called GitOps, and we will write about our own migration to it in a separate article. If you are not yet sure you need Kubernetes, read What Is Kubernetes, and When Is It Worth It?; every principle in this article also works on a single server with Docker Compose.

How do you know CI/CD is working?

With numbers. The four core DORA metrics come straight out of the pipeline: how often you release, how long a change takes from commit to production, what percentage of releases need a rollback or an urgent fix, and how long it takes to recover from a bad release. These metrics, and why speed and stability have to be measured together, are covered in What Is DevOps? Two more numbers are worth tracking for CI/CD: the average pipeline run time, and the percentage of runs that failed with no code change, only because of a flaky test or an infrastructure problem.

CI/CD maturity checklist: where is your team?

Read from the bottom. The level where you can answer "yes" to every item is your current level.

Four levels of CI/CD maturity: manual, automated, reliable and zero-downtime
Four levels of CI/CD maturity: manual, automated, reliable and zero-downtime

Level 1: Manual

Level 2: Automated

Level 3: Reliable

Level 4: Zero downtime

The biggest gain is the jump from level 1 to level 2, and it usually takes less time than teams expect. The hardest jump is from 3 to 4, because most of it is changes to the application and the database, not to the pipeline.

What Dropp Tempo does in this area

Dropp Tempo is Dropp's infrastructure and operations division. With CI/CD setup, work starts by reviewing your current release path; then we design and build a pipeline that fits your stack: automated build and test, security scanning, zero-downtime deployment and fast rollback. The pipeline is tested on staging and documented for your own team so you can maintain it. If your team has no DevOps engineer and you want someone to own this path after setup too, the managed DevOps team covers CI/CD alongside the rest of your infrastructure.

Frequently asked questions

What is CI/CD in simple terms?

CI/CD is an automated path that builds, tests and delivers every code change to the live environment. Instead of one person releasing code to a server by hand each time, a pipeline does the same job the same way every time, with defined checks.

What is the difference between CI and CD?

CI (continuous integration) is about merging and verifying code: every change is merged into the main branch early and built and tested automatically. CD is about getting that change to users: a version that passed CI goes along an automated path to staging and production.

What is the difference between continuous delivery and continuous deployment?

In continuous delivery, every healthy version is ready to release, but releasing to production is a human decision. In continuous deployment, that manual gate is removed too, and every change that passes all the automated checks is released automatically. Continuous deployment is not possible without continuous delivery.

What is a pipeline in CI/CD?

A pipeline is a chain of automated stages that runs with every code change, such as tests, build, security scanning and deployment. Each stage runs only if the previous one succeeded, and the pipeline definition itself is kept in Git alongside the code.

Where should I start learning CI/CD?

With the project you currently release by hand. First write down the current deployment steps, then build a pipeline that only runs build and tests on every commit. Once that is stable, add image builds, automatic deployment to staging and one-click production releases. The tool matters less; GitLab CI, GitHub Actions and Jenkins all share the same concepts.

How long does it take to set up CI/CD?

For most teams, a complete pipeline with tests, scanning and automated deployment usually takes one to three weeks, depending on the complexity of the stack and the number of services. Reaching zero-downtime deployment can take longer, because it usually requires changes in the application itself, such as health checks and graceful shutdown, and in the database migration routine.

Does a small team need CI/CD?

Yes, and a small team may need it even more, because it has less time for manual work and for fixing broken releases. You do not need canary releases and GitOps from day one; a simple pipeline with tests, a single build, one-click releases and a tested rollback is enough to start.

Is zero-downtime deployment possible with database changes?

Yes, provided incompatible changes are split across several releases. With the expand-and-contract pattern, the new structure is added first, the code moves to it gradually, and the old structure is dropped only once no version uses it. That way, the running version is never incompatible with the database at any moment.

By the Dropp Tempo Engineering Team