Said's Blog

Continuous integration vs delivery vs deployment

January 20, 20243 min read
image

CI and CD are commonly used acronyms in modern development practices and DevOps. CI, short for continuous integration, is a core DevOps principle that developers regularly integrate code changes into a central repository, triggering automated builds and tests. However, CD can refer to either continuous delivery or continuous deployment.

Continuous integration

Developers engaged in continuous integration aim to merge their modifications into the main branch frequently. To validate these changes, developers generate a build and execute automated tests on it. This approach helps prevent integration issues that may arise if changes are postponed until the release day for merging into the release branch.

Continuous integration places a strong emphasis on automated testing to ensure that the application remains intact whenever new commits are integrated into the main branch.

Continuous delivery

Continuous delivery serves as an expansion of continuous integration by automatically deploying all code changes to a testing and/or production environment following the build stage.

This entails not only automated testing but also an automated release process, enabling to deploy an application at any time with a simple click of a button.

In principle, continuous delivery allows the flexibility to choose a release frequency—whether daily, weekly, bi-weekly, or in alignment with the business needs. However, to fully reap the benefits of continuous delivery, it is advisable to deploy to production as early as possible. This ensures the release of small batches that are easily manageable in case of troubleshooting.

Continuous deployment

Continuous deployment takes the concept of continuous delivery to the next level. In this approach, any change that successfully passes all stages of the production pipeline is automatically released to users. This process eliminates the need for human intervention, and only a failed stage can prevent the deployment of a new change to the production environment.

Continuous deployment proves to be an effective method for expediting the feedback loop with users and alleviating pressure on the team, as there is no longer a designated "release day". Developers can concentrate on software development, witnessing their work go live within minutes of completion.

Understanding the interconnections between practices

In simple terms, continuous integration is part of both continuous delivery and continuous deployment. And continuous deployment, is similar to continuous delivery, with the key distinction that releases occur automatically.

ci-cd interactions