CI/CD Pipelines
CI/CD is a set of practices that aims to improve the speed and reliability of software releases.
There are two parts in CI/CD:
-
Continuous Integration (CI): CI is about merging code changes frequently. Developers push their code to a shared repository multiple times a day. Each integration is verified by automated builds and tests. This helps catch and fix issues early.
-
Continuous Delivery (CD): CD takes the code that passed CI and automatically deploys it to a staging environment. It ensures that the code is always in a deployable state. The final step to production can be manual or automated.
Now, let's see what a CI/CD pipeline might look like:
-
Code commit: Developers push code to the repository.
-
Build: The application is compiled.
-
Unit tests: Small parts of the code are tested individually.
-
Integration tests: Different parts of the application are tested together.
-
Deploy to staging: The application is automatically deployed to a test environment.
-
Acceptance tests: The application is tested in an environment similar to production.
-
Manual approval: A team member reviews and approves the changes.
-
Deploy to production: The application is deployed to the live environment.
-
Post-deployment tests: Final checks are done to ensure everything works in production.
-
Monitoring: Appropriate alarms are set to find issues in the production servers.
Steps 1 to 5 are CI and steps 6-10 are CD.
Creator