Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Our goal is to keep Code in the KIELER Mainline as stable as possible. Automatic plugin builds and tests after each commit and nightly RCA builds help to improve source code stability. As headless builds of Eclipse plugins and features are not trivial, the following software is used in KIELER

...

Warning

This page is currently being updated as we work on a revised build process, which is to be explained here in detail.

In order to keep the KIELER code as stable as possible, we use automatic continuous integration builds. Once you push something into one of the KIELER repositories, you trigger the automatic build process. If the build fails for whatever reason – be it failed unit tests or simply compilation errors – you are notified of the problem.

This page describes the software and setup we use to implement all of this.

Content

Table of Contents

Software We Use

To implement our automatic builds, we use the popular Maven tool in conjunction with Tycho, a set of Maven plug-ins that allow Maven to build Eclipse projects. To implement our continuous integration builds, we use Atlassian Bamboo.

Maven / Tycho

Maven is a build tool for Java projects that handles automatic . It takes care of dependency management, including in-build dependencies (the order in which packages are compiled) as well as dependencies to third-party libraries, which . The latter are automatically fetched from special Maven repositories. A Without getting too technical, a Maven build consists of several phases, such as compile, and package, etc. Within those phases each phase, several Maven plugins plug-ins handle different tasks (or in maven-speak goals), for example the  goals, as Maven calls them). The maven-compile-plugin for example compiles .java files into .class files. Maven builds are configured in XML files calles pom.xml. Those

To correctly compile a project, Maven needs to be told about the project. While the popular Ant build tool uses build.xml files to describe the steps to be executed for building a project, Maven uses pom.xml files to describe the project and figures out the steps for itself. The POM files may inherit configuration settings from a parent POM file, each package contains one pom.xml which containes package specific configuration and a reference to a parent pom.xml. The parent POM includes, besides common configuration, all module names of child POMs.

Tycho is a set of Maven plugins that handles compiling and dependency management as well as bundling of Eclipse pluginsplug-ins. This means Tycho can read and understand Tycho understands Eclipse metadata files such as plugin.xml or feature.xml, provides dependency information extracted from those files, and provides an Eclipse runtime instance for compiling and packaging of Eclipse bundles.Eclipse bundles.

Bamboo

While Maven and Tycho know how to compile KIELER, Bamboo knows when to compile KIELER and what to do with the compiled project. Bamboo has access to our source code repositories and triggers continuous integration builds every time someone pushes new code into a repository. It also does a full build every night and copies the results onto our nightly build update site to be accessed by people all around the world. And beyond. Tell your friends!

The Automatic Build Process

Maven and Tycho in KIELER

In KIELER there is a parent POM located in build/de.cau.cs.kieler.parent, there are mid-level POMs in features and plugins and finally each plugin and feature directory contains a POM file. Furthermore to handle building an Eclipse P2 repository and the KIELER RCA there is a special repository project with its own POM in build/de.cau.cs.kieler.repository. As KIELER is built against a P2 repository generated from our Eclipse reference installation, the following magic command updates the P2 build repository after changes to the installation.

...

Afterwards the assembled RCA and P2 repository may be found in build/de.cau.cs.kieler.repository/target. Similarly single plugins or features are found in the target subdirectory of the respective package.

Automatic Builds (Bamboo)

Maven with Tycho only provides the possibility of headless KIELER builds without starting Eclipse. To facilitate automatic builds, further software to monitor source code repositories, start builds after each check-in, notify developers of failed builds, etc. is needed. For KIELER we are using Bamboo by Atlassian

Bamboo in KIELER

The Continuous Integration Build

At the moment there are four jobs configured for KIELER

Juno 4.2 Continuous Plugins

  • Builds and tests KIELER plugins after each commit
  • Sends notifications of failed builds to the responsible developer(s)

Juno 4.2 Product Nightly

  • Builds all of KIELER including all plugins, features as well as the RCA and the KIELER P2 Repository every night.
  • Deploys RCA and repository to the download server
  • Assembles the KLay libraries (with and without EMF included) into jar files and deploys them to the download server
  • Sends notifications about failed commits to the responsible developer(s) and staff members

Kieler Rating Nightly

  • Builds and deploys the KIELER class rating website with a special javadoc doclet

Nightly QA Build

  • Runs nightly static code checkers, code metrics as PMD, FindBugs, Checkstyle etc.

...