RSS: Blog | Wiki | Forum

Buildbot

From Easyneufenglish

Jump to: navigation, search

PageOutline

Contents

[edit] BUILDBOT

Buildbot spirit is to create a master that contains all necessary data to do test:

  • sources update
  • compilation
  • report

This master manage to launch compilations on slaves. These slaves have a minimalistic configuration.

[edit] Sources update

Buildbot can look for sources changes with Mercurial. We must use a hook that we put on the mercurial we're searching changes on. This hook consists on a call to a python script which manage to send changes to the master. There is no identification, the sending is just done on one port. To differentitate projects, we just send a branch paramater that match with the repository name.

This script is called hgbuildbot.py. This script is provided in the buildbot directory.

Utilisatio example : 9buildroot .hg/hgrc
[paths]
default = http://hg.easyneuf.org/9buildroot

[hooks]
changegroup.buildbot = python:buildbot.changes.hgbuildbot.hook

[hgbuildbot]
master = 0dev:9989
branchtype = dirname

[edit] Configuration

Read buildbot manual

[edit] Ressources and projects

Easyneuf project is formed by many projects. The buildbot master can be found on the 0dev machine. For masters and slaves, all necessary files can be found in the /var/lib/buildbot directory.

For each slave we created 2 different chroot environment :

Nom (schroot) Location Description
etch-9buildroot var/lib/chroot/etch-chroot Minimalistic debian etch used to compile NeufOS(9buildroot)
etch-dev var/lib/chroot/etchdev-chroot Debian etch with development packages used to compile each different project individuall (9mcc, minidesk, 9panel ...)

Here is the project list and important slaves :

projet slave Description
autobuild-easyneuf dev6 Official image generation from 9buildroot-prod and autobuild
opengate dev3 Official opengate image generation from 9buildroot and the build script
autobuild-akeo dev8 Official AKEO image generation from 9buildroot-prod and autobuild-akeo

[edit] Slaves installation

  • Install buildbot 0.7.5
  • Install schroot
  • Uncompress buildbot_chroots_conf.tgz in the system root this file contains the 2 chroot planned for buildbot. Be carrefull, this one modify buildbot init script and schroot configuration file.
  • Add /proc in fstab for chroot
  • Add a valid shell for buildbot
  • Modify buildbot uid so that they will grant with the host system
  • Modify buildbot.tac parameters in the /var/lib/buildbot/slave file in the chroot
  • Configure /etc/default/buildbot
  • Make a cron to delete old builds
  • Launch the whole process
  • Enjoy!!