Continuous Integration (CI) is a software development practice where developers integrate their code changes into a shared codebase frequently, often on a daily basis. According to DevOps Research and Assessment (DORA), teams perform better when developers merge their work into the mainline at least once a day. Before and after the merge, a suite of automated tests is run to validate that the changes don't introduce regression bugs. If these tests fail, the team stops what they're doing to fix the problem immediately.
The benefits of CI are significant and include higher deployment frequency, more stable systems, and higher quality software. To implement CI, organizations need an automated build process that creates authoritative packages that can be deployed to any environment. The builds should be numbered and repeatable, and the build process should run successfully at least once a day.
A suite of automated tests is also essential for successful CI implementation. Organizations should start with a handful of reliable unit and acceptance tests that cover the high-value functionality of their system. New functionality should be covered by tests, which should run quickly to provide feedback to developers as soon as possible. The tests should run successfully at least once a day, and feedback should be visible to the team through a CI system that runs the build and automated tests on every check-in.
Continuous Integration also includes trunk-based development, where developers work off the mainline in small batches and merge their work into the mainline at least daily. Additionally, an agreement that fixing a broken build takes priority over any other work is necessary for successful CI implementation.
To create maintainable suites of automated tests, organizations can practice test-driven development (TDD), where developers write automated tests that initially fail before implementing the code that makes the tests pass. TDD ensures that developers write modular and easy-to-test code, which reduces the maintenance cost of the resulting automated test suites.
Adoption Expectations
Practice | MVP | MVP+ |
---|---|---|
Develop an automated build process |
+ |
+ |
Enable automated test execution as part of the build process |
+ |
+ |
Adopt automated CI and build agent systems |
+ |
+ |
Launch CI process on every check-in |
|
+ |
Merge changes to trunk / mainline every day |
|
+ |
Keep build green and releasable |
|
+
|
Tools
Functionality | Tool Name |
---|---|
Version Control System |
Git |
Version Control Collaboration |
Azure DevOps Repo, Bitbucket |
Artifact Management System |
JFrog Artifactory, Azure Artifacts
|
Roles
Name | Responsibilities |
---|---|
Scrum Master/Team Coach |
Coach and support usage of the best engineering practices to support continuous integration |
Developer |
Adopt practices to develop new changes in a small easy implement and verify steps |
Build Engineer |
Integrate automated quality gates and deployment process |
Test Automation Engineer (TAE) |
Implement automated tests in advance allowing continuous testing process |