What is CI/CD?
Understand CI/CD Pipeline
21 November, 2022
4
4
1
Contributors
In today’s fast-evolving world, one of the top challenges for software companies is to respond quickly to market and customer demand. To meet client needs, they must produce better products faster. To do so, they must automate some processes, which is where CI/CD comes into play.
Introduction
CI/CD stands for Continous Integration and Continous Deployment. DevOps refers to the software development life cycle. The steps are usually written out within an infinite loop. It's a cycle that repeats forever.
The steps in the cycle are:
•
Developers write the code.
•
Then it gets Built or compiled together.
•
Then it's tested for bugs.
•
Then it is put into production and used by end users or consumers.
•
Then we monitor and collect feedback.
•
And then repeat
So, without wasting a bit. Let's dive into the world of CI/CD.
Continuous Integration(CI)?
Continuous Integration is a development practice that requires developers to integrate code into a shared repository several times a day. The code is verified by an automated build which allows teams or project owners to detect any problems early on in the project.
In simple words,
In CI practice, developers build, run, and test code on their workstations before they commit code to the repository. After making changes to the repo, a chain of events happens.
Here, events are some tasks that happen in the CI pipeline.
The CI pipeline involves the following tasks:
•
Detect changes to the source code repository (new commits appear)
•
Analysis of the quality of source code
•
Project build
•
Perform all unit tests
•
Run all integration tests
•
Generate deployable artifacts
•
Status of report
If one of the steps above fails:
•
Integration may stop or continue depending on the severity and configuration of the defect.
•
Results are reported to the team via email or chat system.
•
The team fixes the defect and commits it again.
•
Tasks are carried out again.
So, this is how the CI works; let's look at what CD is.
Continuous Delivery
Continuous Delivery is a software development methodology in which teams produce software in short cycles, guaranteeing that each build is theoretically ready for release at any time.
In CD, deployment in a production environment can be either approved by a human or done automatically without explicit consent.
As you can see above, before deploying the product, there is some manual approval needed. When the programmer or owner approves this update, then the update/product will deploy unless it will not.
But, it can also be done automatically using Continous Deployment.
Continuous Deployment
It is a strategy in which all the changes are automatically deployed for production after continuous integration.
So, this is the whole process of CI/CD.
What is CI/CD Pipeline?
A CI / CD pipeline is a method for delivering a change unit that begins from development to delivery. It contains some phases and those are:
1.
Commit / Source Stage:
When the developers start building any project or make changes to an existing one, they commit changes to the repository.
2. Build Phase:
The source code is merged with all its dependencies to create a build file during this phase.
3. Testing Phase / Automated Testing
Here, we'll be running automated tests to validate the efficiency of our code and the functioning of our software.
4. Deploy Phase
This is the last phase of the CI/CD pipeline. In this phase, the built version will be delivered to production.
Conclusion
CI/CD is one of the best practices that most software companies and open-source communities use. So, that's the wrap-up for this blog. I hope after reading this blog, you may have a fair understanding of CI / CD. If you like this blog, do share it with friends.
You can Join My
opensource
devops
cicd
develevate