ContinuousIntegration

Table of Contents

Introduction

Motivation

Advantages

  • Rapid software development
  • there is some visible progress.
  • It makes debugging easier because the changes there are only few changes to be taken into consideration.
  • Less friction

Challenges

  • requires discipline
  • controversial discussions? Proponents of Gitflow?
  • Management support required
  • requires technical sophistication, e.g. Infrastructure as Code, test automation.

Sources of information

Basic concepts

Build contents

  • compilation
  • unit tests
  • static code analysis
  • code coverage analysis

Branching model

Process guidelines

Every developer checks into the master branch at least once a day

Every check-in triggers a build and automated tests

Fixing a failed build needs to have highest priority

The build time should be short

  • at best only 10 minutes

SCM should contain all build information

It should be possible to run the build of the project after the checkout on a developer machine with nothing but the OS and compiler installed.

  • tests
  • configuration
  • database schemas
  • installation scripts
  • etc.

Common pitfalls

Misunderstanding of the basic concepts

Jez Humble, author of Continuous Delivery and one of its founding fathers, has an informal survey he likes to give to audiences. It starts with a simple question: "Raise your hand if you do continuous integration." A sea of hands always rise. Then he says "Put them down if all of the developers on your team don't check into the main code-line at least once a day." A large number of hands usually fall. Then he probes: "Put your hands down unless every check-in triggers a build plus unit test run." More hands go down. And finally: "Put your hands down if the build isn't fixed within ten minutes of it going red." Humble reports that more often than not, only a few hands remain raised.

(J. Paul Reed)

Unsufficient automated testing

CI without a solid quality system is a receipt for desaster.

(Gruver et. al, p. 61)

Read more

GitHubImpressum