Continuous Integration (CI) is a development practice where developers integrate code into a shared repository frequently, preferably several times a day. Each integration can then be verified by an automated build and automated tests. While automated testing is not strictly part of CI it is typically implied.
One of the key benefits of integrating regularly is that you can detect errors quickly and locate them more easily. As each change introduced is typically small, pinpointing the specific change that introduced a defect can be done quickly.
In order to understand the importance of CI, it’s helpful first to discuss some pain points that often arise due to the absence of CI. Without CI, developers must manually coordinate and communicate when they are contributing code to the end product. This coordination extends beyond the development teams to the rest of the organization, as well. Product teams must coordinate when to sequentially launch features and fixes and which team members will be responsible.
Without a robust CI pipeline, a disconnect between the engineering team and the rest of the org can form. Communication between product and engineering can be cumbersome. Engineering becomes a black box which the rest of the team inputs requirements and features and maybe gets expected results back. It will make it harder for engineering to estimate time of delivery on requests because the time to integrate new changes becomes an unknown risk.
At Console Labs, achieving an efficient deployment pipeline is done by following these best practices:
- The process for releasing/deploying software MUST be repeatable and reliable
- Automate everything - automate all the tasks you repeatedly do, and this tends to lead to reliability
- Done means “released.”
- Write good commit message, since they will directly translate to product team changelogs
- Github action
There is 5 different environments for most of our services.
Preview and Production share the same underlying database/infras, we separated them for user experiences.
- Write a meaningful commit`
- All tests passed
- Backward compatible for all APIs & migrations