Continuous Integration & Continuous Delivery

Continuous Integration

Continuous Integration (CI) is a practice where a team of developers integrate their code early and often to the main branch or code repository. The goal is to reduce the risk of seeing “integration hell” by waiting for the end of a project or a sprint to merge the work of all developers.

One of the primary benefits of adopting CI is that it will save you time during your development cycle by identifying and addressing conflicts early. It’s also a great way to reduce the amount of time spent on fixing bugs and regression by putting more emphasis on having a good test suite. Finally, it helps share a better understanding of the codebase and the features that you’re developing for your customers.

 

 

Continuous Delivery

Continuous Delivery (CD) is an extension of continuous integration to make sure that you can release new changes to your customers quickly in a sustainable way. This means that on top of having automated your testing, you also have automated your release process and you can deploy your application at any point of time by clicking on a button.

In theory, with continuous delivery, you can decide to release daily, weekly, fortnightly, or whatever suits your business requirements. However, if you truly want to get the benefits of continuous delivery, you should deploy to production as early as possible to make sure that you release small batches that are easy to troubleshoot in case of a problem.

 

 

Continuous integration in 5 steps

You should now have a good idea of the concepts behind continuous integration, and we can boil it down to this:

  • Start writing tests for the critical parts of your codebase.
  • Get a CI service to run those tests automatically on every push to the main repository.
  • Make sure that your team integrates their changes every day.
  • Fix the build as soon as it’s broken.
  • Write tests for every new story that you implement.