DevOps: Demystifying CI vs. CD and the “Delivery-Deployment” Differences
Kosseila Hd
Jul 11, 2023 7:00:00 AM
In the space of software delivery, CI/CD has emerged as a game-changing framework that accelerates the development life cycle. While most users consider practicing a handy shortcut to knowledge, diving headfirst into the CI/CD universe without a solid grasp of the fundamental bases is like trying to learn salsa moves without understanding tempo or footwork. It’s crucial to understand the core principles that underpin a framework and their nuances to avoid confusion when talking to team members and clients. You first need to get your terminology right.
In this short post, we will revisit the basic definition of a few core components of DevOps CI/CD, bridging the gap between what you might have thought you knew, and what you truly comprehend.
Both are related to the continuous delivery of software applications but serve different purposes.
CI (Continuous Integration):
The most widely known, it is a process of regularly integrating code changes into a shared repository, allowing teams to detect and resolve issues quickly. The goal of CI is to ensure that each change made to the codebase is automatically tested, verified, and integrated into the main codebase as soon as possible.
This is where the compiling/building/packaging of your software happens including unit tests.
CD (Continuous Delivery/Deployment):
Is a process of deploying software changes to a production environment in a reliable, efficient, and repeatable manner. The goal of CD is to automate the entire software delivery process, from building the application to testing, deploying, and monitoring it in production.
In summary, CI focuses on testing and integration, while CD focuses on the automation of software delivery.
Continuous Integration (CI) Pipeline Testing
CI testing is focused on ensuring that the changes made in the codebase do not introduce new bugs and that the codebase meets the predefined quality standards. The testing is done as early as possible in the development process, typically after every code commit or at least daily.
Continuous Delivery/Deployment (CD) Pipeline Testing
CD testing is focused on ensuring that the changes made in the codebase can be reliably deployed to the production environment with minimal or no disruption. The testing is done after the code is built and packaged, and it is performed in an environment that is as close to the production environment as possible. The CD pipeline also includes testing for non-functional requirements such as performance, scalability, and security.
In summary, while testing is a critical part of both CI and CD pipelines, the testing strategies and objectives may differ depending on the pipeline’s goal.
Here again, CD has a double meaning as it encompasses both Delivery & Deployment, serving a dual purpose in the CI/CD framework.
Continuous Delivery
A continuous delivery pipeline automatically tests the application but keeps the deployment decision as a manual step (manual trigger)
Continuous Deployment
A continuous deployment pipeline, on the other hand, will automatically deploy this working version ( no manual approval)
Which one to choose
There is no “right” or “wrong” way. Different organizations have different needs. Use the one that delivers the most value to your customers! As the author of The Manifesto of agile development, Martin Fowler says,
“Continuous Deployment means that every change goes through the pipeline and automatically gets put into production, resulting in many production deployments every day.”
Not to be confused with continuous delivery, which is getting the application in a state that is ready for deployment (Developers don’t necessarily deploy it immediately). Continuous deployment finishes off that last mile.
I hope that the above bits into the fundamentals of CI/CD, allowed you to unlock a deeper understanding of their significance in the DevOps landscape if you’re starting in this journey
CI & CD aren’t just buzzwords, but powerful methodologies that empower software development
It is crucial for us, practitioners, to grasp these small yet important nuances
As said before, understanding the terminology is key to making sense of every CI/CD practice