Continuous Integration

rw-book-cover

Metadata

  • Author: Martin Fowler
  • Full Title: Continuous Integration
  • Category:articles
  • Summary: Continuous Integration is a practice that emphasizes frequent integration of code into a shared repository. It relies on a clear mainline branch and requires developers to integrate their work at least daily. Continuous Integration aims to keep the mainline in a healthy state by running automated builds and tests with every commit. It also encourages small, frequent commits and the use of feature flags to enable easy rollback and A/B testing. Continuous Integration helps teams detect and fix bugs more quickly and allows for more frequent deployment. However, it requires strong testing skills and a focus on building self-testing code.
  • URL: https://martinfowler.com/articles/continuousIntegration.html

Highlights

  • integrating the work of multiple developers is a long and unpredictable process. (View Highlight)
  • considering different strategies to handling branching (View Highlight)
  • Folks who encounter a crufty code base wonder how it got into such a state, and often the answer lies in an integration process with so much friction that it discourages people from removing that cruft. (View Highlight)
  • It’s possible to use a regular programming language to automate builds, indeed simple builds are often captured as shell scripts. But as builds get more complicated it’s better to use a tool that’s designed with build automation in mind. (View Highlight)
  • TDD isn’t essential for Continuous Integration, as tests can be written after production code as long as they are done before integration. But I do find that, most of the time, TDD is the best way to write self-testing code. (View Highlight)
  • Imperfect tests, run frequently, are much better than perfect tests that are never written at all. (View Highlight)
  • Full mainline integration requires that developers push their work back into the mainline. If they don’t do that, then other team members can’t see their work and check for any conflicts. (View Highlight)
  • all commits coexisting on a single branch. While it may be useful to use CI service to do an automated build for different branches, that’s not the same as Continuous Integration, and teams using Continuous Integration will only need the CI service to monitor a single branch of the product. (View Highlight)