What is CI/CD?

CI/CD is the automated path from a code change to running software: every change is built and tested, then packaged and released through the same repeatable steps.

What do the letters stand for?

Continuous integration, and continuous delivery or continuous deployment. Integration means developers merge small changes often, and each merge is built and tested automatically, so breakage shows up within minutes. Delivery means every change that passes is packaged and ready to release with one approval. Deployment goes one step further and releases every passing change to production automatically. Many teams practise delivery for production and deployment for test environments.

Which stages does a pipeline usually have?

StagePurposeTypical duration goal
BuildCompile, install dependencies, produce an artefactUnder 5 minutes
Unit tests and lintCatch logic and style errors fastUnder 5 minutes
Security scansSecrets, dependencies, image contentsUnder 2 minutes
Integration testsRun against real databases and services10 to 20 minutes
Package and publishPush an image or package to a registryMinutes
DeployRoll out to staging, then productionMinutes, with health checks

Fast feedback is the point: a pipeline that takes an hour gets bypassed.

What is an artefact and why build it once?

The packaged output of a build: a container image, a binary, a package or an archive. Build it once, give it an immutable identifier such as a commit hash or image digest, and promote that same artefact through test, staging and production. Rebuilding for each environment risks shipping something slightly different from what was tested, for example because a dependency changed in between.

How are releases rolled out safely?

Gradually, with automated checks and a quick way back. Rolling updates replace instances a few at a time. Blue-green deployment runs the new version beside the old and switches traffic at once, keeping the old version ready for instant rollback. Canary releases send a small share of traffic to the new version first and watch error rates before continuing. Feature flags decouple deploying code from enabling it. On servers without a cloud load balancer, HAProxy or NGINX in front handles the traffic switching; our Load balancing article shows a setup.

Why run CI on your own hardware?

Speed, cost predictability and caching. Builds are bursty and hungry for CPU and disk; shared hosted runners are often small and charged per minute. A dedicated machine keeps dependency caches, container layers and compiled objects between runs, so the second build is far faster than the first. Self-hosted runners for every major Git platform install in minutes:

# register a Forgejo runner on a build server
forgejo-runner register --no-interactive --instance https://git.example.net \
  --token "$RUNNER_TOKEN" --name metal-build-01 --labels metal:host,docker:docker://node:22
systemctl enable --now forgejo-runner
# give builds RAM-backed scratch space for temp files
mount -t tmpfs -o size=24g,mode=1777 tmpfs /var/tmp/ci

How big should a build server be?

Core count drives parallel jobs, clock speed drives single compile steps, and NVMe drives dependency installs. ESSENTIAL-L combines 16 at high clocks with 128 GB DDR5 for $106.20 a month; ESSENTIAL-XL with 48 suits large monorepos and many concurrent pipelines. Ports in Europe and Canada are unmetered, so pulling images and dependencies all day costs nothing extra. Our CI runners and build farms page has detailed sizing.

How should secrets be handled in pipelines?

Narrowly and temporarily. Give each pipeline only the credentials its stage needs, store them in the CI system's secret store or an external vault, mask them in logs and never pass them to jobs from untrusted forks. Deployment keys should only be able to deploy, not administer servers. Keep production credentials out of build jobs entirely by letting a separate deploy step, or a pull-based tool such as Argo CD, apply releases. Our DevSecOps article covers pipeline security further.

How do I improve a slow or flaky pipeline?

Measure each stage, cache aggressively, parallelise and quarantine flaky tests. Most slow pipelines spend their time downloading dependencies or running tests one after another. Cache package directories and container layers on the runner, split test suites across parallel jobs, and track tests that fail intermittently so they can be fixed rather than retried forever. Our DevOps article puts CI/CD into its wider context.

Machines for CI runners

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-MAMD Ryzen 9 9900X1264 GB2x 512 GB SSD NVMe1 Gbps unmetered$70.80
ESSENTIAL-LAMD Ryzen 9 9950X16128 GB2x 960 GB SSD NVMe1 Gbps unmetered$106.20
ESSENTIAL-XLAMD EPYC TURIN 945548128 GB2x 1.92 TB SSD NVMe1 Gbps unmetered$212.40
BUSINESS-4 2026AMD EPYC 4585PX1664 GB2x 960 GB SSD NVMe3 Gbps unmetered$212.40

Related pages

CI runners and build farms

High clock Ryzen and many-core EPYC machines for CI runners, container builds and compile farms that finish faster.

Read more

DevOps

The working culture that joins building and running software: shared ownership, automation, small frequent releases, measurement and the practices that support them.

Read more

DevSecOps

Building security checks into everyday development and operations: pipeline scans, secrets handling, hardened infrastructure code and fast feedback to developers.

Read more

Load balancing

Spreading requests over several servers: layer 4 and layer 7 balancers, algorithms, health checks, sticky sessions and self-built designs with HAProxy.

Read more

Questions and answers

Does continuous delivery mean every change goes live automatically?

Not necessarily. Continuous delivery keeps every passing change ready to release with one approval; continuous deployment releases every passing change automatically.

Why build an artefact only once?

So the exact bytes that passed testing are the ones released. Rebuilding for each environment can pick up different dependencies.

Can I run CI runners on a dedicated server?

Yes. Self-hosted runners for Forgejo, GitLab and other platforms run on any Linux server and keep caches between builds for much faster pipelines.

How long should a CI pipeline take?

Feedback on build and unit tests within about ten minutes is a good target. Longer integration suites can run in parallel or on a schedule.

What is a canary release?

Sending a small share of traffic to a new version first and watching error rates and latency before rolling it out to everyone.