Sobes.tech
Junior

What is the difference between continuous integration (CI) and continuous delivery (CD)?

sobes.tech AI

Answer from AI

Continuous Integration (CI) is a methodology where developers frequently integrate code changes into a shared repository, after which automated builds and tests are performed. The main goal of CI is to quickly identify and fix integration issues.

Main stages of CI:

  • Developers commit code to a centralized repository.
  • An automated build of the project is triggered.
  • Automated tests (unit, integration) are run.
  • Upon success, a ready build artifact is created.
  • Team members are notified of errors.

Continuous Delivery (CD) is an extension of CI, where code changes that have passed CI and additional automated tests are ready for deployment to production at any time. Deployment to production still requires manual approval.

Main stages of CD (added after CI stages):

  • After successful testing in the CI environment, the artifact is ready for deployment.
  • Additional automated tests (e.g., functional, load testing) are performed in intermediate environments.
  • The system is ready to deploy the artifact to production on demand, usually by pressing a button.

Key differences:

Aspect Continuous Integration (CI) Continuous Delivery (CD)
Main goal Code integration and testing Readiness for deployment to production
Focus Development and testing Deployment to intermediate and production environments
Deployment Usually to test/integration environments Ready to deploy to production
Automation Build and tests + Deployment preparation process
Approval Not required for each change Requires manual approval for production

Continuous Deployment is an even more advanced form of CD, where every change that passes all automated stages is automatically deployed to production without manual intervention. This represents the highest level of maturity in the delivery process.