1. Home
  2. Blog
  3. DevOps

DevOps

What Is CI/CD? Continuous Integration and Delivery Explained

CI/CD is the habit of building, testing and releasing software automatically, in small steps, many times a day. Learn what each letter means, what a pipeline does and how to start with one short file.

7 min read
What is CI/CD? Continuous integration and delivery explained

Key takeaways

  • CI means merging small changes often and checking each one automatically with a build and tests.
  • Continuous delivery keeps every change ready to release with one click. Continuous deployment releases it automatically.
  • A pipeline is the automated path from a commit to a running application.
  • You can start with one short workflow file that builds and tests on every pull request.

Years ago, teams shipped software every few months. Developers worked alone for weeks, merged everything at the end and spent days fixing the clashes. CI/CD grew out of that pain: make changes small, check them automatically and release them constantly.

This guide explains what CI/CD is without jargon, and ends with a file you can paste into a real project.

What CI/CD means

CI/CD stands for continuous integration and continuous delivery (or continuous deployment). It is a set of practices backed by automation tools, usually part of a wider DevOps approach.

The goal is simple: whenever someone changes the code, a system proves that the change still works and, if you choose, ships it.

Continuous integration (CI)

With CI, every developer merges their work into the shared branch often, often several times a day. Each merge triggers an automatic job that builds the project and runs the tests. If something fails, the team sees it within minutes, while the change is still fresh in the author’s mind.

Good CI depends on good habits: small pull requests, a clear branching approach (see Git merge vs rebase) and tests that are fast and reliable.

Continuous delivery vs continuous deployment

The two CDs differ by one decision: who presses the release button.

Practice What happens after tests pass Human step
Continuous integration Build and test every change Review and merge
Continuous delivery The change is packaged and ready to release at any time Someone approves the release
Continuous deployment The change goes to production automatically None, apart from the earlier code review

Most teams begin with continuous delivery and move to continuous deployment only when their tests and monitoring are strong enough to trust.

What a CI/CD pipeline does

A pipeline is a series of automated stages. If one stage fails, the pipeline stops, and the change does not move forward.

  1. Source: a commit or pull request triggers the run.
  2. Build: compile the code or build a container image.
  3. Test: unit tests first, then integration and end-to-end tests. See our end-to-end testing best practices.
  4. Package: create the artifact you will release, such as an image or a bundle.
  5. Deploy: send it to staging, then to production.
  6. Monitor: watch errors and performance, and roll back if needed.

Many pipelines build containers. If that is new, read our Docker tutorial for beginners and the Docker Compose tutorial for running dependent services.

A working example

This is a complete CI workflow for GitHub Actions. It checks out the code, installs dependencies and runs the tests and the build on every pull request and on every push to main.

# .github/workflows/ci.yml
name: CI
on:
  pull_request:
  push:
    branches: [main]

jobs:
  build-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm
      - run: npm ci
      - run: npm test
      - run: npm run build

Commit the file and open a pull request. GitHub shows a green check or a red cross next to your commit. For a deeper walkthrough with secrets, caching and deployment, see our GitHub Actions CI/CD guide, or run browser tests in it with the GitHub Actions Playwright workflow.

Benefits and costs

  • Faster feedback: you learn about a broken change in minutes, not weeks.
  • Smaller risk: small releases are easier to understand and to undo.
  • Consistent releases: the same steps run every time, with no “works on my machine”.
  • Less manual work: people stop copying files and clicking through checklists.

The costs are real too: someone must maintain the pipeline, slow or flaky tests waste time, and the team needs the discipline to fix a red build immediately.

Tip: treat a failing pipeline as a stop sign. If people get used to merging on red, the whole system loses its value.

How to start with CI/CD

  1. Put your code in a shared repository and use pull requests.
  2. Add the smallest useful workflow: install, test, build.
  3. Make the tests fast. Keep the pipeline under ten minutes if you can.
  4. Require the pipeline to pass before a pull request can be merged.
  5. Add automatic deployment to a staging environment, then to production when you trust it.

Final thoughts

CI/CD is not a product you buy, it is a way of working supported by automation. Start with one file that runs your tests, then grow the pipeline one stage at a time.

Frequently asked questions

What does CI/CD stand for?

CI/CD stands for continuous integration and continuous delivery or continuous deployment. It describes automating the build, test and release of software.

What is the difference between continuous delivery and continuous deployment?

In continuous delivery, every change is ready to release but a person approves it. In continuous deployment, every change that passes the pipeline is released to production automatically.

What is a CI/CD pipeline?

It is the automated workflow that takes a code change through build, test, packaging and deployment stages, and stops if any stage fails.

Which tools are used for CI/CD?

Popular choices include GitHub Actions, GitLab CI/CD, Jenkins, CircleCI and Azure DevOps. Pick the one that fits where your code already lives.

Is CI/CD the same as DevOps?

No. DevOps is a broader culture of collaboration between development and operations. CI/CD is a set of practices and tools that supports it.

Keep learning

Work with Stack Quora

Need help with testing, WordPress or SEO?

We help teams ship better software and grow their sites. Tell us what you are working on and we will suggest a clear next step.

Keep reading

More guides on testing, AI & modern development

Enjoyed this article? Pick a topic and jump straight into our newest tutorials.

Artificial Intelligence

LLM Structured Output Explained: Getting Reliable JSON From AI Models

LLM structured output explained with validation we ran in Pydantic: JSON mode and schemas, constrained decoding, the ways model output…

Read article →
DevOps

SSH Keys Explained: How They Work, ssh-keygen, Ed25519 and Safe Habits

SSH keys explained with keys we generated: public vs private keys, ssh-keygen, Ed25519 vs RSA, fingerprints, passphrases, ssh-agent, authorized_keys, config…

Read article →
DevOps

HTTP Caching Explained: Cache-Control, ETag and 304 Responses, With a Live Test

HTTP caching explained with a small server we ran: Cache-Control directives, max-age, no-cache vs no-store, ETag revalidation and 304 responses,…

Read article →
Test Automation

API Contract Testing Explained: Catch Breaking Changes Before They Ship

API contract testing explained with a schema check we ran: what a contract is, consumer-driven contracts, Pact, OpenAPI, which changes…

Read article →
Software Testing

Risk-Based Testing Explained: Score Risks, Build a Matrix and Test What Matters

Risk-based testing explained step by step: identifying risks, scoring likelihood and impact, building a risk matrix, mapping risk to test…

Read article →
Databases & SQL

SQL Constraints Explained: NOT NULL, UNIQUE, CHECK and FOREIGN KEY, Tested

SQL constraints explained with tests we ran: NOT NULL, UNIQUE, CHECK, DEFAULT, PRIMARY and FOREIGN KEY, the NULL loopholes, SQLite's…

Read article →
Databases & SQL

SQL Date Functions Explained: Adding, Comparing and Grouping Dates Without Bugs

SQL date functions explained with queries we ran: adding intervals, month-end surprises, date differences, the BETWEEN trap, grouping by day,…

Read article →
Software Development

Python asyncio Explained: async, await, gather and TaskGroup With Real Timings

Python asyncio explained with code we timed: coroutines, await, gather, TaskGroup, error handling, timeouts, limiting concurrency and the blocking-call mistake…

Read article →
Software Development

Debounce vs Throttle in JavaScript: How They Work, When to Use Each, Tested

Debounce vs throttle in JavaScript explained with timings we measured in Node.js: how each works, simple implementations, leading and trailing…

Read article →
Software Development

Python Context Managers Explained: The with Statement, contextlib and Real Uses

Python context managers explained with code we ran: how with works, __enter__ and __exit__, contextlib.contextmanager, suppress, ExitStack, database transactions and…

Read article →
Artificial Intelligence

LLM Temperature and Top-p Explained: How AI Models Choose Their Next Word

LLM temperature and top-p explained with a simulation we ran: how probabilities are reshaped, what top-p keeps, recommended settings by…

Read article →
DevOps

YAML Explained: Syntax, the Norway Problem and Other Traps We Tested

YAML explained with a parser test: basic syntax, lists and maps, the Norway problem, versions turning into floats, octal zip…

Read article →
DevOps

Cron Jobs Explained: Syntax, Real Schedules and the Mistakes That Break Them

Cron jobs explained with schedules we verified: the five fields, operators, real examples, the day-of-month OR day-of-week trap, environment problems,…

Read article →
Software Testing

Bug Life Cycle in Software Testing: Every Status, Who Owns It and Common Mistakes

The bug life cycle explained: every defect status from New to Closed, who owns each step, rejected, deferred and reopened…

Read article →
Test Automation

Property-Based Testing in Python: Hypothesis Finds the Bugs Your Examples Miss

Property-based testing explained with Hypothesis tests we ran: properties vs examples, strategies, shrinking, the real bugs it found in our…

Read article →
Databases & SQL

SQL Pagination Explained: OFFSET vs Keyset, With a Million-Row Test

SQL pagination explained with a million-row test we ran: LIMIT and OFFSET, why deep pages get slow, keyset (cursor) pagination,…

Read article →
Databases & SQL

SQL EXISTS vs IN: Differences, the NOT IN NULL Trap and Performance

SQL EXISTS vs IN explained with queries we ran: how each works, why NOT IN returns no rows when a…

Read article →
Software Development

Python Logging Explained: Levels, Handlers, Formatters and Mistakes to Avoid

Python logging explained with code we ran: levels, basicConfig quirks, named loggers, handlers and formatters, logger.exception, lazy formatting, duplicate logs…

Read article →
Software Development

JavaScript Map vs Object: Key Differences, Pitfalls and a Benchmark

JavaScript Map vs Object explained with code we ran in Node.js: key types, ordering, the prototype trap, JSON, size, WeakMap…

Read article →
Software Development

Python Type Hints Explained: Annotations, mypy and the Errors It Catches

Python type hints explained with a real mypy run: basic annotations, Optional and unions, TypedDict, Literal, Protocol, generics, Callable, strict…

Read article →
Artificial Intelligence

LLM Tokens Explained: How AI Models Read Text, Count Costs and Fill Context Windows

LLM tokens explained with a tokenizer we ran: how text is split, why counts differ by language and tokenizer, context…

Read article →
DevOps

Semantic Versioning Explained: MAJOR.MINOR.PATCH, Ranges and Release Rules

Semantic versioning explained with code we ran: MAJOR.MINOR.PATCH rules, pre-releases, correct version sorting, caret and tilde ranges, 0.x versions, lockfiles…

Read article →
DevOps

Git Reset vs Revert: How to Undo Commits Safely, With a Tested Example

Git reset vs revert explained with a repository we built: soft, mixed and hard reset, revert commits, reverting merges, recovering…

Read article →
Software Testing

The Test Pyramid Explained: Layers, Ratios and When to Break the Shape

The test pyramid explained: unit, integration and end-to-end layers, sensible ratios, the ice cream cone anti-pattern, the testing trophy and…

Read article →
Test Automation

pytest Fixtures Explained: Scope, yield Teardown, conftest.py and Factories

pytest fixtures explained with a suite we ran: how fixtures work, scopes, yield teardown, conftest.py, factory fixtures, parametrized fixtures, built-ins…

Read article →
Databases & SQL

SQL Upsert Explained: INSERT ON CONFLICT, MERGE and the REPLACE Trap

SQL upsert explained with queries we ran: INSERT ON CONFLICT DO UPDATE and DO NOTHING, the excluded row, conditional updates,…

Read article →
Databases & SQL

SQL LIKE Operator Explained: Wildcards, Case Sensitivity and Performance

The SQL LIKE operator explained with queries we ran: % and _ wildcards, escaping, NOT LIKE and NULL, case sensitivity…

Read article →
Artificial Intelligence

AI Hallucinations Explained: Why Language Models Make Things Up and How to Reduce It

AI hallucinations explained: what they are, why language models produce them, common types, how to reduce them with grounding and…

Read article →
Test Automation

Mocking in Python: unittest.mock, patch and the Mistakes That Make Tests Lie

Mocking in Python with unittest.mock, tested: Mock and return_value, side_effect, patching where a name is used, spec and autospec, mocking…

Read article →
Software Testing

Code Coverage Explained: Line vs Branch Coverage and What 100% Really Means

Code coverage explained with a real coverage.py run: line, branch and condition coverage, reading a report, why 100% coverage can…

Read article →
Artificial Intelligence

What Are AI Agents? How They Work, With a Simple Agent Loop You Can Run

What are AI agents? A plain guide to the agent loop, tools, memory and guardrails, with a small Python loop…

Read article →
Test Automation

TDD vs BDD: Key Differences, One Feature Built Both Ways and When to Use Each

TDD vs BDD explained with one discount feature built both ways: red-green-refactor with code we ran, Given-When-Then scenarios, tools, trade-offs…

Read article →
Software Testing

User Acceptance Testing (UAT): Process, Checklist and Real Examples

User acceptance testing explained: who runs it, how it differs from QA, a seven-step process, a UAT test case template,…

Read article →
Artificial Intelligence

What Are Embeddings? Vectors and Cosine Similarity Explained Simply

What are embeddings? A plain-language guide to vectors, cosine similarity and semantic search, with a small example we ran, common…

Read article →
Test Automation

Flaky Tests: What Causes Them and How to Fix Them for Good

Flaky tests explained with demos we ran: the main causes, how to confirm and diagnose one, proper fixes for timing,…

Read article →
Software Testing

Load Testing vs Stress Testing: Differences, Metrics and k6 Examples

Load testing vs stress testing explained: what each proves, spike and soak tests, the metrics that matter, why averages mislead,…

Read article →