Now we can start going deeper into our topic.

You are likely to have heard the term CI/CD both in the business world or in your own studies. It is an integral part of DevOps, the subject of the previous article.

CI/CD tools

CI (Continuous Integration)

is a continuous control mechanism without integrating the codes after they are developed. All developers send their changes to the main server at certain intervals (usually daily). It is very important that these changes do not affect each other or cause a new problem. Developers need to review old commits before merge every change they make. Although it is not a problem at first, it is both costly and difficult to manually check whether a change made in growing projects causes another problem in the system. Because there may be hundreds or even thousands of merge operations that have been done before. Integration Hell is used for this situation.

Automated tests are used to solve this problem. Running the tests on a CI server not only requires the tests to be passed to ensure integration, but such servers also facilitate analyses, performance measurement and QA of the source code.
This continuous quality control (QA) not only improves the quality of the software, but also enables faster delivery of the work, since no separate time needs to be spent on integration.

CD (Continuous Delivery — Continuous Deployment)

means continuous verification and continuous deployment. The continuous integration that starts with CI is continuously deployed with CD. Tests are run in the CI phase and the new version of the application is deployed in the CD phase.

The CI feedback loop provides automatic feedback to the developer by enabling the automatic realisation of tests for the entire project given in a short time.

You may have witnessed that the CI/CD pipeline (the pipeline where a series of processes take place) is seen as unnecessary or transferred as an additional burden by some circles. But this is completely wrong. Because there are certain steps that need to be taken in order to create a new version of a software product.

A good Pipeline consists of the following main parts:

  • Compilation and testing of code (Continuous Integration)
  • Create a ready-to-deploy build from code (Continuous Delivery)
  • Automatically deploy the application to a server (Continuous Deployment)

The first step in a CI/CD pipeline with a good pipeline is to have an automatic triggering system. The easiest way is to configure the CI/CD tool to check for changes in a Git repository. If you set up the pipeline to be run manually, this increases the cost and can sometimes be forgotten. With an auto-triggered system, you have the peace of mind of knowing that your code will be tested on every change.

After the automatic triggering process, the triggered CI tool checks the code in the Github, Bitbucket, etc. repository. The pipeline that continues with the compilation of the code can do this very easily with Docker. In new environments to be created with container structures to be built on Docker, language-appropriate compilation is done.

After the compilation phase, the test phase begins. The CI/CD tool must be configured correctly so that the tests can be executed correctly. It is very important that the tests are sustainable as well as being applied and passed successfully. If you continue to develop the application and add new modules but do not develop the tests in the same direction, this will jeopardise the sustainability of the application.

After all tests have been passed successfully, you can proceed to packaging the code. How you do the packaging depends on the programming language you use or your target environment. If you are using Docker, which is frequently used in DevOps, you can create a “Docker Image”.

Now that we have done the packaging process, we can start acceptance tests. Acceptance tests are a way to ensure that your software does what it is supposed to do and meets the original requirements. For automated acceptance tests, you can use the Selenium tool, which can simulate user behaviour such as opening websites and clicking on things.

Our software, which has successfully passed the acceptance tests, can now move to the last stage, the “Delivery and Deployment” stage. You can now deploy our software, which has reached the Continuous Delivery stage, thanks to a tool that enables deployment such as Kubernetes (Continuous Deployment).

From now on, every code change you will make in the software will start with the trigger phase and go through the same stages. In order for the CI/CD Pipeline to be successful, great attention should be paid to testing, ease of use and security.

Thus, deployment is not a big scary job that is done once after the whole project is finished and becomes a regular and easy process.

Advantages of adopting CI/CD

CI/CD is one of the most influential changes in the software development industry. Here are a few advantages of adopting CI/CD in your software development process:

  • CI/CD has enables companies to update and deliver their software faster.
  • It enables controlled remote working.
  • It provides more robust progress with continuous tests.
  • It saves time as it enabled the errors to be solved before they grow by communicating the errors to the developers with instant feedback.
  • It makes the delivery step easier.

Basically that is all from my side. I hope that this article helped you a bit. If you like my articles, if you think that they are useful, you can click on “Follow” button and share articles to reach more people. :)

Would you like to support me? You have couple of options: clap, comment, share, follow or buy me a coffee. 🙂

Don’t forget to follow us on twitter. 🥳

--

--

Mammadowr

I speak 6 human and 5 programming languages. 🥳  iOS Developer. To support me: https://www.buymeacoffee.com/mammadowr8 ☕️