Arbit - project tracking

Arbit - project tracking

Build module

A build module should be able to perform various task, when updates occur in the source repository available using the source module, wrapping the VCS wrapper. Possible tasks are:

  • Building documentation

  • Publish nightly builds

  • Running tests

  • Static source code analysis (PMD, ...)

Trigger builds

Builds can be triggered by one or all of:

  • Source code updates in repository

  • After $timespan

  • At $date

Build tools

There are existing build tools like ANT, Phing or make, which are designed to perform complex build tasks and are tested for that. Those need to be integrated and run with the appopriate assigned build scripts.

Setup build environment

The build scripts and optional additional build environment files might reside on the server arbit runs on, or might be available directly inside the source repository. It should be possible to copy those files into the directory where the building actually takes place before executing the build tool

Publish build results

The build results must be handled specifically depending on the type of the result. For this the results generated by the build script must be moved into a dedicated target directory.

For example the test result files would have to be moved to $targetBaseDirectory/tests.xml, so the publisher knows where to locate the build results.

Moving the test results to the correct location can either be implemented in the build file, which might not always be portable, or using dedicated post building tasks.

Configuration example

A basic example configuration could look like:

<?xml version="1.0"?>
<config>
  <trigger>
    <or>
      <crontab>15 */2 * * *</crontab>
      <vcs/>
    </or>
  </trigger>
  <build>
     <copy>
       <source>${vcs.path}/build/build.xml</source>
       <dest>${vcs.path}/build.xml</dest>
     </copy>
     <execute cwd="${vcs.path}">/usr/bin/ant build.xml</execute>
     <copy>
       <source>${vcs.path}/report/phpunit.xml</source>
       <dest>${target}/test.xml</dest>
     </copy>
  </build>
</config>