Changes between Version 1 and Version 2 of BuildAutomation

Aug 9, 2018, 8:35:04 PM (8 months ago)

continuous integration


  • BuildAutomation

    v1 v2  
    11= Build Automation =
    3 The Bitten plugin for Trac has been installed to allow automation of builds. Build slaves can be configured to run in the background so that whenever a source code checkin is made, the affected part of the tree is rebuilt and tested. This mainly applies to [source:box/trunk trunk].
     3We use continuous integration to test new commits before merging them to the master branch. This should ensure that the master branch always passes all of our tests, and is of sufficient quality for a release. We do not plan to make any specific numbered version releases any more, since the master branch is always of release quality.
    5 For a list of currently configured build slaves, check the [/build Build Status] page.
     5Every commit is tested using the following three Continuous Integration services:
    7 == Setting Up a Build Slave ==
     7* [ Travis] for Linux (Ubuntu LTS) and Mac OS X builds and tests (Autoconf and CMake).
     8* [ AppVeyor] for Windows builds and tests (CMake only).
     9* [ Buildbot] for Linux (CentOS, Debian, Ubuntu), FreeBSD, SmartOS and Mac OS X builds and tests (Autoconf only).
    9 If you wish to run a build slave for a platform that is not already set up, please contact the developers so that Trac can be configured. Currently we only test on a few platforms so more are always welcome!
     11The current status of the Master branch is:
    11 Slaves are authenticated using Trac accounts, so you must request an account if you do not already have one. Authentication is performed via HTTPS.
     13|| Travis || [[Image(, link=]] ||
     14|| !AppVeyor || [[Image(, link=]] ||
     15|| !CentOS 6 || [[Image(, link=]] ||
     16|| !CentOS 7 || [[Image(, link=]] ||
     17|| Debian Jessie || [[Image(, link=]] ||
    13 Download the latest !BittenSlave from and the [source:box/bitten/minion minion] utility. Minion is provided by the Box Backup project. [[BR]]
    14 '''N.B.''' It is recommended to set up a dedicated user for running the build slave to ensure a clean environment, but this is not a requirement. [[BR]]
    15 Once !BittenSlave has been installed copy `minion` to the directory you want builds to be run from. Ensure it is executable.
     19Our Github settings require that each pull request compiles and passes all of our test suite on all of our supported platforms (all of the above except for SmartOS) before being merged to the master branch.
    17 Generate the `bitten-slave` configuration:
    18 {{{
    19 $ ./minion gen-config
    20 Config generated as sunos.ini.
    21 Please set Trac user/pass in the [authentication] section.
    22 }}}
    24 As instructed, set the username and password for Trac in the config file. There is also a section in the file (commented out) for masking the machine's hostname.
    26 Run `minion` for the first time. This will perform a check of the environment.
    27 {{{
    28 $ ./minion
    29 This looks like the first time you've run the bitten minion.
    30 I need to check a few things out first...
    32 Checking for Subversion... OK
    33 Checking for autoconf... OK
    34 Checking for automake... OK
    35 Checking for gcc... OK
    36 Checking for g++... OK
    37 Checking for xsltproc... OK
    38 Checking for LWP::UserAgent... OK
    39 Checking if SSH key exists...
    40   ==> SSH key does not exist. Running ssh-keygen.
    41 Generating public/private rsa key pair.
    42 Your identification has been saved in /home/bitten/.ssh/bitten-minion.
    43 Your public key has been saved in /home/bitten/.ssh/
    44 The key fingerprint is:
    45 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [email protected]
    47   ==> SSH key generated. Be sure to have the key uploaded to the build master!
    49 All done! Binaries look fine, but make sure you have headers for the following:
    50  - openssl
    51  - zlib
    53 Exiting so you can check this, rather than having failed builds reported.
    54 Just re-run minion when ready.
    55 }}}
    57 Take good note of its output! You '''__must__''' ensure that the OpenSSL and Zlib libraries and headers are installed! If anything is missing then builds will be reported as failed. If unsure, try manually compiling trunk and running the unit tests. An SSH key is also generated as part of the output to facilitate uploading of binaries produced. Please ensure you send the ''public'' portion of the key to one of the developers. (Ask on the boxbackup-dev list if you aren't sure.)
    59 Once everything has been verified `minion` can be started:
    60 {{{
    61 $ ./minion
    62 [INFO    ] Slave launched at 2011-05-03 11:33:53
    63 [INFO    ] No pending builds
    64 }}}
    66 By default it will run in the foreground and log to a file called `bitten.log` in the same directory. If you wish to background it, you may start it with `nohup`.
    67 {{{
    68 $ nohup ./minion &
    69 }}}
    71 There are also examples for daemonizing the slave on the [ bitten website].
     21The configuration files for [ Travis] and [ AppVeyor] are stored in our main Git repository, and can be used as guides for how to build the software, [wiki:CompileWithVisualC particularly on Windows where it's quite complicated].