Continuous Integration

Steven J Zeil

Last modified: Nov 8, 2018
Contents:

Abstract

In continuous integration, the practices of version control, automated building, automated configuration, and automated testing are combined so that, as changes are checked in to the version control repository, the system is automatically rebuilt, tested, reports generated, and the results posted to a project website.

1 Big Builds

Think of everything we have started to put into our automated builds:


and, coming up, we will want to expand our testing to include

There’s a danger of the builds becoming so unwieldy and slow that programmers will start to look for ways to circumvent steps,


Do We Need to do All of Those Steps, All of the Time?

One possible breakdown:

Every build Occasional
fetching and setup of 3rd party libraries documentation generation
static analysis static analysis reports
compilation deployment/publication of artifacts
unit testing updating of project website
packaging of artifacts integration testing
test coverage reporting
system testing

This should provide someone actively working on a specific module/story the info they need, deferring some of the more time-consuming build activities.


How do we divide these steps in the build?

2 Continuous Integration

When we combine

we can rebuild and retest automatically as developers check in changes.

2.1 Key Ideas

Our project should have the characteristics:

2.1.1 Advantages

2.1.2 Disadvantages

2.2 Continuous Integration Systems

A CI system consists of a server/manager and one or more runners…

2.2.1 The Continuous Integration Server

A continuous integration server is a network-accessible machine that

2.2.2 Continuous Integration Runners

A CI runner (a.k.a., nodes or slave processors) is a process on a machine that

When notified by the server, the runner

  1. Checks out a designated branch of a project from its version control system.

  2. Runs the build.

  3. Publishes reports on the results of the build(s).


3 Case study: Jenkins

Jenkins is a popular CI server.

3.1 Projects on Jenkins

When you set up a project on Jenkins you must supply:

3.1.1 Jenkins and Project Reports

4 Case study: gitlab-ci

gitlab-ci is a CI server integrated into Gitlab.

4.1 gitlab-ci setup

4.2 gitlab-ci vs Jenkins

5 Related ideas