# CI/CD

> CI/CD, short for continuous integration and continuous delivery, is an automated pipeline that tests every code change as it is made and prepares or releases it, so updates reach production quickly and safely.

Also called: continuous integration, continuous delivery, continuous deployment, build pipeline, deployment pipeline. Category: Delivery and quality. Source: https://aibuildindex.com/glossary/ci-cd

## In the index

- AI SaaS MVP: median $4,000, middle half $870 to $10,000, 7,123 priced briefs (https://aibuildindex.com/cost/ai-saas-mvp)

CI/CD replaces manual release steps with an automated routine. Continuous integration means every change a builder makes is merged into the shared code often and tested automatically. Continuous delivery means each change that passes is packaged and ready to release, usually first to a [staging environment](https://aibuildindex.com/glossary/staging-environment), then to production with a click or automatically. For a buyer, CI/CD is what lets a system be improved weekly or daily without each release becoming a risky event.

## How it works

A typical pipeline runs whenever code is pushed to the repository:

- **Build.** The code is assembled and dependencies installed.
- **Test.** Automated tests run, including the [regression tests](https://aibuildindex.com/glossary/regression-testing). For AI systems, a fast subset of [evals](https://aibuildindex.com/glossary/evals) can run here too.
- **Check.** Linting, security scans and other checks look for common problems.
- **Review.** Changes usually also go through [code review](https://aibuildindex.com/glossary/code-review) by a second person before merging.
- **Release.** Passing changes go to staging, then to production through an automated [deployment](https://aibuildindex.com/glossary/deployment).

If any step fails, the pipeline stops and the builder is told. Nothing broken reaches users through the normal route.

In machine learning projects, the same idea extends to models: training, evaluation and release steps run through a pipeline as part of [MLOps](https://aibuildindex.com/glossary/mlops). For no-code automations, full CI/CD is rare, but version history and a tested copy of each workflow give some of the same protection.

## What it means for cost

Setting up CI/CD takes a modest amount of build time and some tooling cost. It pays back over the life of a system: each later change is cheaper to release, and fewer releases go wrong. Without it, releases depend on a builder following manual steps correctly every time, which is slow and error-prone, and the system becomes harder to hand to another team.

That makes CI/CD a fair signal of build quality when comparing quotes for software that will keep changing. Ask a builder:

- Will changes be tested and released automatically?
- Will the pipeline run in our accounts and keep working after handover?
- How do we roll back a release that causes problems?

A system with no pipeline tends to accumulate [technical debt](https://aibuildindex.com/glossary/technical-debt), because each change is risky enough that people avoid making them.

## Common questions

### Is CI/CD necessary for a small AI project?

For a short-lived prototype, often not. For anything that will run in production and be changed over time, even a simple pipeline that runs tests and deploys is worth having. The setup is small compared with the cost of broken releases.

### What is the difference between continuous delivery and continuous deployment?

With continuous delivery, every passing change is ready to release, but a person decides when. With continuous deployment, every passing change goes live automatically. Many business systems use delivery, keeping a human approval step.

## Related terms

- [Deployment](https://aibuildindex.com/glossary/deployment): Deployment is the process of moving a finished build from a builder's development setup into the live environment where real users and real data reach it, including hosting, configuration, secrets and release steps.
- [Regression testing](https://aibuildindex.com/glossary/regression-testing): Regression testing is re-running a system's existing tests after every change to confirm that features which already worked still work, catching new bugs or quality drops before they reach users.
- [Staging environment](https://aibuildindex.com/glossary/staging-environment): A staging environment is a copy of the live system, set up as close to production as possible but without real users, where changes are tested and reviewed before they are released.
- [Code review](https://aibuildindex.com/glossary/code-review): Code review is the practice of having a second developer read and check code changes before they are merged, to catch bugs, security problems and unclear design, and to keep the codebase understandable to more than one person.
- [MLOps](https://aibuildindex.com/glossary/mlops): MLOps is the set of practices for building, deploying and maintaining machine learning models in production, covering data pipelines, training, versioning, deployment, monitoring and retraining when performance declines.
- [Technical debt](https://aibuildindex.com/glossary/technical-debt): Technical debt is the future cost created when a system is built quickly or carelessly, such as missing tests, tangled code or undocumented shortcuts, which makes every later change slower, riskier and more expensive.
