Understanding CI/CD: Continuous Integration and Continuous Delivery/Deployment
Ahmed Al Rqaishi
I recently came across an article on stackpath.com titled "WHAT IS CONTINUOUS INTEGRATION AND DELIVERY (CI/CD)?" by Edge Academy, which provided an introduction to CI/CD (Continuous Integration/Continuous Delivery-Deployment).
CI/CD is defined as follows:
Continuous Integration (CI) involves developers taking the source code from the repository, making modifications such as adding new feature branches, and then moving on to the CI server for further steps.
Continuous Delivery (CD) is the next step after integration, where the finished code is delivered to the relevant environment either manually by the developer or automatically using advanced automation (in the case of Continuous Deployment). Most interactions with web servers and databases in Continuous Delivery are automated by calling a script, except for the delivery of the code, which needs to be triggered by the developer.
In terms of CI, the following basic methods are applied:
1) The developer takes the code from the repository to work on it and make positive changes.
2) After editing, the developer returns the code to the shared repository.
3) The CI server analyzes (builds and tests) the code to determine if there are any drawbacks, such as possible parts with lower functionality than the desired standards, which could lead to application breakage.
4) The team gets notified of any possible compromised parts due to the changes, and after fixing the highlighted problems, the development team moves to the next phase (Continuous Delivery/CD).
Furthermore, the CD phase involves delivering the resulting code files into a variety of environments. For practical instances of deploying scripts, there is an incorporation of YAML configuration files through GitLab (which is a CI/CD pipeline). An example of CI/CD pipelines is CircleCI, which is developed to test and build newer (updated) versions of front-end development frameworks like React.js.
In conclusion, CI/CD systems provide benefits by preventing development teams from falling into high-risk situations that could lead to bugs and errors due to code changes done by individual programmers. The idea behind having CD/CI is to provide an isolated container or a virtual machine that runs the code testing and building tasks after team members make code edits.