CI and CD in the Development Process

Process automation is one of the most important elements of the development process. We can see the particular impact of automation when we talk about quality.

Delivery

From this article you will learn:

  • What is Continuous Integration?
  • What tools can we use to introduce CI / CD?
  • What are pipelines?
  • What is the difference between Continuous Deployment and Continuous Delivery?

CI and CD

CI, meaning Continuous Integration, and CD, meaning Continuous Deployment, are two approaches I could still live without quite peacefully a few years ago. Back then, I did not appreciate automating processes such as publishing an application to a server or running tests before publication. Experience teaches, however.

CI is nothing more than a practice of checking the changes that happen in our code every time they appear in the repository. Verification usually means building the application in a test mode, running unit tests and end-to-end tests, and also checking the quality of the delivered changes: by checking code duplication, determining the level of technical debt, test coverage, and so on.

We use CI practices to reduce the risk of critical bugs, detect errors faster, and minimize the cost of merging work done by different people. Sounds good, right?

CD, on the other hand, is responsible for placing our already built application on the server. In the past, I would manually log in to the server through FTP and move files to the right directories. It required a lot of patience, focus, time, and resistance to possible mistakes while copying files. Fortunately, introducing CD into my work allowed me to end that procedure.

Available Tools

There are many different tools on the market that allow us to build and manage CI and CD processes. The most popular certainly include:

Wow. There Is Quite a Lot of This - What Should We Choose?

Actually, this is a very difficult question, because each of the tools above can perform very well. Each one can be configured by adding the appropriate configuration files to our repository or by clicking through the panel of a given tool. The choice depends on personal preferences - if we use Bitbucket, our eyes will probably turn toward Bamboo; if we like Open Source technologies, we will probably choose Jenkins or Travis; while if we appreciate simple and intuitive interfaces, Buddy will be an interesting choice. I would not like to judge which tool is the best. So far I have used several - in private projects, however, I work with Travis.

Pipelines

When talking about CI, it is worth mentioning pipelines. Put simply: a pipeline is a path, a procedure that has to be performed during CI. Such a path may contain the following steps:

  • listening for a change in the repository (commit, PR)
  • starting the application build process
  • installing the necessary software / configuring the environment
  • building the application
  • running unit tests
  • running e2e tests
  • notifying about the results of tests and the build process (for example by email, Slack, and so on)
  • deploy

In the case of a well-prepared procedure, every error will be reported and will protect us from publishing code that does not meet the minimum requirements when it comes to delivered quality.

CI and Different Environments

Sometimes there are situations where we have several different branches from which code should land on different servers. For example, master - as the production branch - goes to the production server, develop goes to the development server, and staging goes to the test server. Within the whole CI process we can define such differences and indicate which code should go where. In future posts I will try to show you how to define such a procedure in Travis CI.

CD - Continuous Deployment or Continuous Delivery?

Under the abbreviation CD we can also find the phrase Continuous Delivery. How is it different from Continuous Deployment? In Continuous Delivery, the business side also appears and, at the right moment, has to physically approve publishing changes to the server. Such protection may make sense when the business wants to influence the timing of delivering new features.

Summary

A developer's work very often requires focus, patience, and a lot of attention. Sometimes we make "stupid" mistakes that are hard to catch. CI and CD are meant to help us eliminate publishing such mistakes and detect them earlier - if only for this reason, it is worth getting familiar with these processes.

Thanks to CI and CD, the phrase deploy on Friday does not have to sound as scary as it once did. A well-written procedure can sometimes guarantee us a calm weekend.

And that is what I wish you. ;)

Sources

Share this article:

Comments (0)

    No one has posted anything yet, but that means.... you may be the first.

You may be interested in

If this article interested you, check out other materials related to it thematically. Below you will find articles and podcast episodes authored by me, as well as books I recommend that expand on this topic.

Czy precommit hook to zło? by
Article
2025-05-27

Are Pre-commit Hooks Evil?

Tools come in all shapes and sizes - some better, some worse, some loved, others hated - but they’re always created with a specific purpose in mind. Today, let’s talk about one such tool: is the pre-commit hook really as bad as some people say?

Read more
Monorepo vs Polirepo by Mateusz Jabłoński
Podcast
01 March 2023

Monorepo vs Polirepo

Programowanie to nie tylko podejmowanie decyzji, kiedy jaką funkcję napisać czy jak nazwać zmienną. Programowanie to proces, który trzeba zainicjować podejmując różne decyzje, które będą na niego rzutowały w następnych etapach. Jedna z nich to odpowiedź na pytanie: Monorepo czy Polirepo?

Posłuchaj
NextJS i co dalej by Mateusz Jabłoński
Podcast
01 June 2023

NextJS i co dalej

NextJS wprowadził React'a na nowe ścieżki. Śmiało można powiedzieć, że twórcy Next'a zmieniają frontend. O tym rozmawiamy w piątym odcinku podcastu Piwnica IT.

Posłuchaj

Zapisz się do newslettera

Bądź na bieżąco z nowymi materiałami, ćwiczeniami i ciekawostkami ze świata IT. Dołącz do mnie.