Software Configuration Management
Software Configuration Management
Chapter 1
Software Configuration
Management and
Continuous Integration
Matthias Molitor, 1856389
R EPOSITORY:
A repository is a storage that contains the code of a Definition:
project as well as its history [3]. Repository
W ORKING COPY:
The working copy is a view into the repository. It resides
locally and contains all files that belong to the project. Definition:
Code modifications are performed in the working copy Working copy
[12].
C OMMIT:
A commit is a set of changes that is send to a repository Definition:
[3]. Commit
R EVISION :
Each state of the repository that existed at some point in Definition:
time is called a revision [3]. Revision
Different revisions
can be compared
Diff of Changes Sometimes it is useful to check in detail
what changes occurred. Therefore, version control systems
are able to create so called diffs between files in different re-
visions. A diff shows the content in both versions and gives
information about inserted, deleted and changed lines [9].
Previous
configuration states
can be restored Restoring Configurations Version control systems pro-
vide the ability to restore each software configuration that
was committed. That allows developers to jump back in
time and is especially useful if a change introduced unex-
pected problems.
1.2 Version Control 7
Development lines
can be separated
Branching To simplify parallel development, the concept
of branching is supported. Any revision may be used to
start a branch. Each branch represents a separate line of
development that can be merged back later [9].
2000: SVN
overcomes major
issues of CVS
1.2 Version Control 9
Currently the version control systems SVN and Git are very
popular. The following sections give an introduction into
the basic usage of both tools.
Subversion
SVN uses a central
repository
As already mentioned SVN follows the central repository
approach. Therefore, a repository must be created at server
10 1 Software Configuration Management and Continuous Integration
side first.
/trunk
/branches
/tags
svn status
svn update
Git
Git does not require
a central repository
In contrast to Subversion Git does not rely on a central
repository. The distributed character of Git implicates that
each working copy is also a repository. Distributed version
control establishes
The absence of a centralized repository makes new working new working models
models possible. Figure 1.7 shows an example for the us-
age of distributed repositories with Git. Developers use the
blessed repository as starting point, but they do not directly
send back their changes. Instead, each developer sends
changes to her own public repository. An integration man-
ager is responsible for selecting changes from these reposi-
tories and merging them into the blessed repository. The user identity is
configured locally
When using Git the first time, the own identity that consists
of a name and an email address should be configured:
git init
git status
Besides SVN and Git there are several other VCS available.
Table 1.1 gives a rough overview of the features that are
provided by some common VCS.
1.3.1 Requirements
Location of current
code must be known
Single Repository CI requires a central repository where
the current code can be found. Therefore, it relies on the ex-
istence of a version control system that holds all the source
that is required to build a project [6].
1.3.2 Advantages
1.3.3 Rules
To get the most out of CI, there are a few rules each devel-
oper must follow.
Commit at least once
a day
Frequent commits Changes must be commited fre-
quently. Early integration does not provide a great ben-
efit if the integrated modifications are already one month
old. Therefore, each developer should commit her results
at least once a day [5].
Keep the main
development line
Stable development version The main development line stable
is usually used as a starting point when creating new fea-
tures and everybody should be able to consider it as stable.
Therefore, obviously broken code should not be committed
into the main branch [5].
Build local before
committing
Local builds To avoid build failures, each developer
should run a build locally before committing changes into
the main branch [5].
Fix failed builds
immediately
Immediately fixed builds When a build fails, the whole
team should work together to fix it immediately. A build
that always fails does not provide much useful information.
Therefore, that state should not last longer than absolutely
necessary [5].
20 1 Software Configuration Management and Continuous Integration
1.3.4 Tools
Established tools
simplify CI process
Although it is possible to apply CI without using 3rd party
software, the usage of widely used and tested tools simpli-
fies the process greatly.
Hudson/Jenkins
The build history is shown on the left. It tells the user when
builds were executed and which of these builds were suc-
6
http://www.hudson-ci.org/
7
http://jenkins-ci.org/
1.3 Continuous Integration 21
Travis CI
Travis provides CI as
a service
Travis CI8 is a rising CI system that is available as a service.
It is tightly coupled to Github9 and currently very famous
among its users. Builds can be
8
executed in different
http://travis-ci.org/
9 environments easily
https://github.com/
22 1 Software Configuration Management and Continuous Integration
1.4 Conclusion
Bibliography