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:

  1. Code commit: Developers push code to the repository.

  2. Build: The application is compiled.

  3. Unit tests: Small parts of the code are tested individually.

  4. Integration tests: Different parts of the application are tested together.

  5. Deploy to staging: The application is automatically deployed to a test environment.

  6. Acceptance tests: The application is tested in an environment similar to production.

  7. Manual approval: A team member reviews and approves the changes.

  8. Deploy to production: The application is deployed to the live environment.

  9. Post-deployment tests: Final checks are done to ensure everything works in production.

  10. Monitoring: Appropriate alarms are set to find issues in the production servers.

Steps 1 to 5 are CI and steps 6-10 are CD.