Continuous Integration - aka CI - is the practice of often / regular code merges into central (mainline) branch in central repository. CI is a core concept of DevOps that implements the Principles of Flow.
Regular means at least daily. Often hourly. Or more frequent. It also means everyone releases at that frequency. The Trunk Based Development workflow provides the closest implementation of this concept.
CI makes use of Automated Testing to validate commits before they are allowed to merge into the code base. Only if that succeeds the pipeline progresses and usually ends in a Build Package being created.
CI is a usually the first stage / step in a Deploy Pipeline.
The goal of Continuous Integration is to minimize merging issues. Merging issues result from code contributors working on their “line of code” for too long, without merging it back into a shared location. The usual reasons for that are:
- Code contributors working on their own machine, without checking into and checking out from mainline
- Code contributors check in and out regularly, but work in a feature branch that itself diverges from mainline
The consequences of merging Continuous Integration are manifold, here a few:
- Increased Productivity: Joining divergent code-bases very early on is much faster and far less error prone than doing it later
- Increased Reliability: Bugs in mainline are easy to address immediately and back-integrate into ongoing changes, because mainline is always close to every ongoing change
- Increased Profit: Beneficial results of code changes become available almost immediately and do not need to wait until the rest of the change is finished
- Increased Signal: Feedback Loops are almost immediate and steering the outcome does not suffer from delays that would distort the picture
- Increased Collaboration: Working on recent code points makes it much easier to help each other out, as such changes by another can be easily integrated into one’s own change
- Wikipedia: Continuous integration
- Martin Fowler: Continuous Integration
- Atlassian: What is Continuous Integration?
- AWS: What is Continuous Integration?