DEV Community

Cover image for CI / CD
Jeferson 'Shin' Leite Borges
Jeferson 'Shin' Leite Borges

Posted on

CI / CD

What are these texts?
I was studing and for me to have some real study done I need to write it down, this is a small collection of topics that I studied in the last few weeks.
Other links from the same study-pool:

What is CI / CD

CI/CD is a process that helps developers quickly and frequently deliver applications to customers by automating the development process. CI/CD is a software development practice that emphasizes continuous integration, continuous delivery, and continuous deployment.

CI/CD is a helpful solution for integrating new code, which can often cause problems for development and operations teams, it's also, a process that helps your software development team keep their applications running smoothly and efficiently by automating and monitoring them throughout the development process. The "CI/CD pipeline" is a collection of interconnected practices that are often used by development and operations teams working together in an agile way.

Continuous integration vs. delivery vs. deployment

The CI/CD has a few different meanings.

The "CI" always refers to continuous integration, is an automation process that developers use to keep their code bases up-to-date. Successful CI means that new code changes to an app are frequently built, tested, and merged to a shared repository. One way to avoid the problem of having multiple branches of an app in development that could conflict with each other is to use a solution like Git.

The "CD" refers to continuous delivery and/or continuous deployment, which are related concepts that sometimes get used interchangeably. Both are about automation, but they are also used to show how much automation is happening.

Continuous delivery means that changes to an application are automatically tested and uploaded to a repository, where they can be deployed to a live production environment by the operations or devops team. It is an answer to the problem of poor visibility and communication. It is the purpose of continuous delivery to make it easy to deploy new code.

CI/CD Flow

It is possible for CI/CD to specify just connected practices of continuous integration and continuous delivery, or it can also mean all connected practices of continuous integration, continuous delivery, and continuous deployment. Sometimes "continuous delivery" is used to make it more complicated because of the processes of continuous deployment as well. CI/CD is a process that involves adding a high degree of ongoing automation and continuous monitoring to app development, so it's probably not worth your time to get bogged down on specific definitions.

Case-by-case, what the terms refer to depends on how much automation has been built. Many enterprises start by adding CI, and then automate delivery and deployment down the road, for instance as part of cloud-native apps or just to enhance the process of the deployment.

Continuous integration, the CI

In modern application development, the goal is to have multiple developers working on the same app. If an organization is set up to merge all branching source code on a single day, the resulting work can be tedious, manual, and time-intensive. There is a chance that a change to an application will conflict with other changes made by other developers. The problem can be further compounded if each developer has their own IDE settings, instead of the team agreeing on a single cloud-based IDE, or sharing the same settings for all the IDEs.

The integration should happen on a daily basis, or in the best, multiple times a day. Once a developer's changes to an application are merged, those changes are validated by automatically building the application and running different levels of automated tests, to ensure the changes haven't broken the app. The entire app needs to be tested, from classes to the different modules. Continuous integration makes it easier to fix bugs when automated testing discovers a conflict between new and existing code.

Continuous delivery, the CD

Continuous delivery streamlines the release of code to a repository following the automation of builds and unit and integration testing. In order to have an effective continuous delivery process, it is important that continuous integration is built into the development process. The goal of continuous delivery is to have a codebase that is always ready for deployment to a production environment. This involves test automation and code release automation from the merge of code changes to the delivery of production ready builds. The operations team is able to deploy an app quickly and easily at the end of the process.

Continuous deployment, the other CD

Continuous deployment is the final stage of a mature CI/CD pipelines. Continuous delivery is an extension of continuous deployment, which automatically releases a production ready build to a code repository. Continuous deployment relies heavily on well-designed test automation because there is no manual gate at the stage.

Continuous deployment means that a change to a cloud application can be made within minutes if it passes automated testing. It's easier to receive and incorporate user feedback now. It is easier to release changes to apps in small pieces, rather than all at once, as a result of all of these connected CI/CD practices. There is a lot of upfront investment since automated tests will need to be written to accommodate a variety of testing and release stages.

What are some common CI/CD tools?

A team can automate their development, deployment, and testing with CI/CD tools. Some tools specifically handle integration, some manage development and deployment, and others specialize in continuous testing or related functions. Currently most of the repository solutions already have some level of CI/CD integrated, like Gitlab CI/CD, Github Actions and others.

There is also other tools that automate the process like Jenkins, TravisCI, Spinnaker, GoCD, Concource and Screwdrivers. All these solutions provides almost the same level of CI and CD for most of the projects. At the end of the day, does not matter what specific tool is used as long there is a process for the CI and CD on the project and most of the deployment can be automated.

Top comments (0)