Software developers sometimes confuse these three practices since each of them has the same goal: to enable engineering teams to release software faster and more frequently. The confusion disappears if these practices are viewed as levels of maturity in continuous delivery. A team starts with Continuous Integration, then moves on to Continuous Delivery, and then, if necessary, to Continuous Deployment.
Let’s look deeper at each practice to better understand what it implies.
Continuous Integration is a software development practice of merging the working code branches into the main branch as often as possible (normally as soon as a feature in the working branch is complete) and then automatically running test suit against the main branch on a dedicated test server.
The goal of Continuous Integration is to ensure that the main branch contains all the completed features, passes all existing tests as well as code quality and security checks, and is in deployable state at any time.
Continuous Delivery is a software development practice of having fully automated deployment process, so that the main branch can be deployed to production or staging environment at any time by clicking a button.
The goal of Continuous Delivery is to remove the complexity from deploying code to production and enable the business to release the product as often as it wants.
Continuous Delivery requires Continuous Integration to ensure the main branch is in deployable state.
Continuous Deployment is a software development practice of automatically deploying the main branch to production once a working branch has been merged into it and all the tests and checks have passed.
Continuous Deployment requires Continuous Delivery to be able to do automated deploys.
The goal of Continuous Deployment is to deliver features to customers as soon as they are ready to get feedback sooner. It also allows to detect and fix regressions relatively quickly since most releases are small.
Not all products require Continuous Deployment. Some customers may not need or want new versions to be released daily, they may prefer weekly or monthly updates.
If a dev team wants to implement Continuous Deployment for an existing product, they should implement Continuous Integration first.
What is interesting, for a new product, it is relatively easy to implement Continuous Integration together with Continuous Delivery/Deployment. In my opinion, developers should configure a CI/CD pipeline for a new product as soon as they start writing code for it.
Also published in my Medium account.