What is meant by CI/CD?
What is meant by CI/CD?
This is a method of regularly delivering apps to customers and automating all phases of application development. The main concepts of CI/CD are Continuous Integration, Continuous Delivery and Continuous Deployment. CI/CD solves the problems that integrating new code can cause for DevOps teams (also known as "integration hell").
In particular, CI/CD ensures continuous automation and monitoring throughout the entire app lifecycle, from the integration and testing to the deployment and implementation phase. These interrelated practices are often referred to as the "CI/CD pipeline" and are supported by agile collaboration between DevOps teams.
What is the difference between CI and CD (and the other CD)?
The abbreviation CI/CD has different meanings. "CI" means Continuous Integration, i.e. the automation process for developers. In a successful CI, new code changes for apps are regularly developed, checked and merged in a common repository. This is intended to prevent the conflict that too many branches of an app can cause if they are developed simultaneously.
"CD" means Continuous Delivery or Continuous Deployment. These are related concepts that are sometimes used synonymously. Although both concepts deal with the automation of further phases of the pipeline, the terms are sometimes used differently to illustrate the extent of automation.
Continuous delivery typically means that a developer's app changes are automatically tested for bugs and uploaded to a repository (such as GitHub or a container registry) from where they can be deployed by the operations team in a live production environment. This process is the answer to transparency and communication problems between dev and business teams. It is designed to ensure that new code can be implemented with minimal effort.
Continuous Deployment (the other "CD") can refer to the automatic release of developer changes from the repository to the production phase, where they can be used directly by the customer. This process is intended to counteract the overload of operations teams during manual processes that slow down application deployment. Continuous Development extends the benefits of continuous delivery by automating the next phase of the pipeline.
CI/CD Pipeline
Sometimes CI/CD refers only to the interrelated practices of Continuous Integration and Continuous Delivery, but sometimes it also refers to all three concepts of Continuous Integration, Continuous Delivery and Continuous Deployment. The whole thing is further complicated by the fact that Continuous Delivery sometimes also refers to the processes of Continuous Deployment.
Ultimately, however, these details do not get us anywhere. Just think of CI/CD as a process that is often visualized as a pipeline and that involves a high degree of continuous automation and monitoring in application development. Depending on the case, the interpretation of the term depends on the degree of automation of the CI/CD pipeline. Many companies initially work with CI and later continue the process with automated deployment and implementation, e.g. for cloudnative apps.
Continuous Integration
In modern application development, several developers work on different features of the same app. The simultaneous merging of all source code branches in one day (also known as "Merge Day") can be a huge amount of work and time. The reason for this is that application changes made by developers working separately can conflict with each other if they are performed simultaneously. This problem can be aggravated if each developer defines his own local Integrated Development Environment (IDE) instead of creating a common cloud-based IDE as a team.
Continuous Integration (CI) allows developers to merge their code changes into a common "branch" or "trunk" of the application much more frequently, sometimes even daily. Once a developer's changes are merged, they are validated in automated app builds and different levels of automation testing (typically unit and integration testing). This ensures that functionality has not been compromised. All classes and functions up to the various modules of the app must be tested. If the automated test detects conflicts between current and new code, CI can help resolve them more quickly and frequently.
Technical Details
Continuous Delivery
After automating builds and unit and integration testing for the CI, continuous delivery also automatically releases the validated code to a repository. Therefore, to ensure an efficient continuous delivery process, the CI must already be integrated into your development pipeline. The goal of continuous delivery is a code base that can be made available in a production environment at any time.
With continuous delivery, every phase - from merging code changes to delivering production-ready builds - includes automated testing and code releases. At the end of this process, the operations team can quickly and easily deploy an app into production.
Continuous Deployment
The final phase of the CI/CD pipeline is Continuous Deployment. As an extension of Continuous Delivery, in which production-ready builds are automatically released to a code repository, Continuous Deployment also automates the release of an app into the production phase. Because the production phase in the pipeline is not preceded by a manual gate, automated testing must always be well thought through in continuous deployment.
In practice, continuous deployment means that a developer's app changes can go live within minutes of their creation (provided they pass the automated test). This makes continuous integration of user feedback much easier. All these interrelated CI/CD practices make an application implementation less risky because changes are released in parts rather than all at once. However, the up-front investment is considerable, since automatic tests must be written for the various test and release phases in the CI/CD pipeline.