3 x Continuous (Integration, Delivery, Deployment)

Szymon Lisiecki
Liki Blog
Published in
4 min readMay 26, 2020

Are you a programmer wondering how to increase your efficiency and decrease the number of bugs? Or are you a project manager wondering how to deliver value to your clients and make this process less stressful at the same time? If you have replied ‘yes’ to any of these questions, feel free to read the rest. If you haven’t…read it anyway 😊

Introduction

At the beginning of a programming learning process, regardless of the language, we all have gone through the same stuff. Usually it started with the legendary ‘hello world’. When we finally managed to write source code and then run the program, we saw the longed-for string on the console. It meant that we’d done everything well so far.

Then it was a time for deepening our knowledge on data types, conditional statements and loops. After mastering the basics and writing a few (and few more and tens more and hundreds more) lines of code, it was about time to treat programming seriously. Open source and commercial projects plus teamwork urged us to look for some tools that can make the process of code writing easier. Various naming conventions, design patterns, tools for static code analysis and many more lent us a hand.

Next ‘initiation stage’ was testing, both unit, component, integration and end2end tests. At the very end of this complicated puzzle there is an application release. Both release and even more, deploying an application to production environment is usually stressful. We are never 100% sure if our application works as we expected it to work. What if it turns out it has bugs? We need to go through almost the whole process once again which means correcting the code, testing it and deploying. Each of these elements takes time plus there can appear some ‘human errors’, such as faulty testing, mistakes during application deployment and so on.

So can we somehow simplify all this work? Can we make this whole process of creating and deploying an application more pleasant, less stressful and safer? Of course we can! Three magic terms come in handy.

Continuous Integration

Continuous integration means merging your changes into the main branch of an application as often as possible. In order to do this, there is a pipeline created in which an application is being built, automated tests are run and if there are no bugs, the code will be merged into the main branch.

The main advantage of this approach is a very quick detection of possible bugs and feedback for a programmer.

Continuous Delivery

Continuous delivery is an extension of the continuous integration idea. After automatic testing and merging source code, there is an automatic application building and preparing release to production. The idea behind this approach is to release an application by clicking only one button. Having such an automated processes, the moment of release depends only on our business needs. We can do it even every day. After all, it all happens automatically.

Continuous Deployment

Continuous deployment is in turn an extension of the continuous delivery idea. In the previous step, we had all the processes automated, together with release. However, deploying an application to production environment needed our intervention. Here, having continuous deployment, that manual step is replaced with an automatic step. It means that when we commit any change to a repository, it automatically appears on production. The only thing that can withhold the whole process is a failed test. Only in this case the whole pipeline is stopped and the change doesn’t appear on production.

Tools

Pros and costs

The main advantages of the CI/CD approach are:

  • fewer bugs on production
  • programmers can work more efficiently as they don’t have to go back to the code and remind themselves the context to fix the bug — they are informed about a bug almost immediately
  • complexity of the deployment process falls into oblivion, team members don’t have to spend additional time to prepare for release
  • frequent release means quicker feedback from our clients
  • greater clients’ satisfaction as they are often updated on progress

Unfortunately, as usually, these solutions are not free from costs for the organization, such as:

  • necessity to write automated tests for each, even the slightest, change
  • being aware that test quality impacts directly the quality of final release
  • programmers need to be disciplined as they need to merge their code into the main branch as frequently as possible
  • necessity to introduce additional mechanisms so that the unfinished functionalities don’t affect application performance

The idea of continuous integration is already there in many various companies, both the smaller ones and the global giants. It just helps to write higher quality code. Continuous Delivery or Continuous Deployment aren’t so common yet. But it will change as well. More than that, this change is happening in front of us. More and more companies start to realize the benefits it brings to implement these ideas within an organization. You can change your companies from the inside and the world around you as well. So educate yourself, educate others and implement CI/CD as it’s worth it!

--

--