Introduction to CI/CD
- CI & CD are best practices for software development and deployment.
- They enable frequent software changes to be applied whilst maintaining system and service stability
- Companies like AWS, Netflix, Google, and Facebook have pioneered this approach to releasing code, successfully applying thousands of changes per day
CI Workflow
Imagine you have multiple developers working on different features or bug fixes of the same application
First CI Phase - Code Repository
- All contributing to the same application
- Sharing the same code repository (e.g. Git)
- Frequently pushing their updates into the shared repository, at least daily
Second CI Phase - Build Management System
- Code repository integrated with a build management system
- Code changes trigger an automated build
- We need a way to ensure that any code change does not break the build or introduce new bugs in the application
Third CI Phase - Test Framework
- The test system runs automated tests on the newly built application
- Identifies any bugs, preventing issues from being introduced in the master code
- CI focuses on small code changes, which are frequently committed into the main repository once they have been successfully tested
Continuous Delivery / Deployment
CD can mean either Continuous Delivery or Continuous Deployment; there is a difference:
Continuous Delivery
Continuous Delivery is a development practice where merged changes are automatically built, tested, and prepared for release into staging and eventually production environments.
There is usually a manual decision process to initiate deployment of the new code.