How they work together

In the CD process, you have to create several automated parts. You have to automate CI for the build server and Continuous Delivery for the staging server, which has the ability to deploy in a production environment.

The entire process can be automated from start to finish. Let's explore the different steps for that process:

  1. After completing the work, the developer will check in the code to the branch.
  2. The CI server will pick this change and merge it with the master branch, perform unit tests, and merge the code to the staging environment, based on test results.
  3. The developer will deploy it to the staging environment and QA will test the functionality.
  1. If it passes the QA test then the build will move to the production environment and the CI server will pick the code again, and determine if it's OK to merge into the production environment.
  2. After successfully completing Step 4, it will deploy to the production environment.  
  3. This process changes on the basis of requirement and need.

In CD, changes are constantly tested, deployed, and released to the live or production environment, after successful verification. Code from development to release must be free flowing and it can be maintained and controlled by the Dev team. In the automation process, steps are implemented and executed without any cumbersome workflows. 

People are very often confused with both CDs—Continuous Delivery or Continuous Deployment.

In Continuous Delivery, you are able to create the executable and you can deploy it to the production environment, but you need to do this manually when the business needs it.

In Continuous Deployment, you are able to create the executable and you can deploy it to the production environment, automatically.

In order to do Continuous Deployment, you must be doing Continuous Delivery.