Thursday, June 22, 2023

Devops: Demystifying CI vs. CD and the "Delivery-Deployment" Differences

This image has an empty alt attribute; its file name is cicd_test_deploy.png


In the space of software delivery, CI/CD has emerged as a game-changing framework that accelerates development life cycle
. While most users consider practice 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 foot work. It's crucial to understand the core principles that underpin a framework and their nuances to avoid confusion when talking to team members & clients.You first need to get your terminology right.

In this short post, we will revisit the basic definition of few core components of Devops CI/CD, bridging the gap between what you might have thought you knew, and what you truly comprehend.

Back to basics, what's the difference between CI and CD really?

Implementing QA in a CI/CD Pipeline - Parasoft

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 ( or “beta” / “staging” environments).

    • In summary, CI focuses on testing and integration, while CD focuses on the automation of software delivery.

    How different is testing within CI and CD?

    CI/CD What is it and Why is it Important?

    • 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.

    • 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.

    Continuous delivery vs Continuous deployment

    This image has an empty alt attribute; its file name is cicd_deploy-3.png

    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.

    Stay tuned    


    1. Hey there! Your breakdown of CI vs. CD on BrokeDBA is spot-on, making it easy for readers to grasp the concepts. If you're into optimizing the last mile of software delivery, check out Cleveroad's insightful post on last-mile delivery software at . It's a great complement to your DevOps insights!