This page is part of my personal knowledge database, that helps me to store and navigate my learnings.
Read on here for details

Continuous Integration

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.

After CI is done - that is: a new, verified code commit is the new head of the version history - Continuous Delivery or Continuous Deployment is triggered.

CI is a usually the first stage / step in a Deploy Pipeline.

Continuous Integration.svg

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:

  1. Code contributors working on their own machine, without checking into and checking out from mainline
  2. 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:

  1. Increased Productivity: Joining divergent code-bases very early on is much faster and far less error prone than doing it later
  2. 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
  3. 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
  4. Increased Signal: Feedback Loops are almost immediate and steering the outcome does not suffer from delays that would distort the picture
  5. 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