Buildbot Development

From Apache OpenOffice Wiki
Jump to: navigation, search

Steps to create buildbot development setup.

Buildbot Requirements

The Buildbot requires:

  • Python 2.4 or later: http://www.python.org
  • Twisted: http://twistedmatrix.com - most recent version is recommended. You'll need at least "Twisted" (the core package), and you'll also want TwistedMail, TwistedWeb, and TwistedWords.
    • Note: For Twisted, you first need to install Zope.

Getting the OpenOffice Buildbot

The Buildbot has been customized for Openoffice.org builds. Please checkout buildbot-0.7.3 from Gnome CVS.

cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
no password
cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co ooo-build/scratch/buildbot/buildbot-0.7.3

Installing the Buildbot

After all requirements are met, install buildbot by running following commands in buildbot directory.

python setup.py build
python setup.py install                                                                    

Test installation is proper by running the command

"buildbot --version"

Setting up the Buildmaster

  • Make a buildmaster directory on the machine at an appropriate place.
    • The full path name for this directory is hereinafter referred to as masterdir.
mkdir ''masterdir''
  • Run the buildbot command to create a buildmaster:
buildbot master ''masterdir''
cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
no password
cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co ooo-build/scratch/buildbot/master_config_files
  • You will see the following files:
    • master.cfg - sample buildmaster configuration file. You need to edit this as required.
    • create_logs.pl - perl script for creating summary logs
    • modules - perl modules needed for summary logs
    • buildbot.css - cascaded style sheet which handles look and feel of buildmaster status page.

Please copy these files to masterdir

Setting up the Buildslave

If you are setting up buildslave on different machine than buildmaster, then you need to install buildbot on this machine also. So follow the steps given above to install buildbot. Make a buildslave directory on the machine at an appropriate place.

  • The full path name for this directory is hereinafter referred to as slavedir.
mkdir ''slavedir''

Run the buildbot command to create a build slave:

buildbot slave ''slavedir'' MASTERHOST:9989 ''SLAVENAME'' ''PASSWORD''

where,

Fill in the hostinfo files

  • slavedir/info/admin should contain your name and email address. This is the buildslave admin address
  • slavedir/info/host should be filled with a brief description of the host. For example: OS, version, memory size, CPU speed, versions of relevant libraries installed, and finally the version of the buildbot code which is running on the machine.

Checkout some OO build specific scripts from http://cvs.gnome.org/viewcvs/ooo-build/scratch/buildbot/slave/

cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
no password
cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co ooo-build/scratch/buildbot/slave

You will see the following files:

  • buildbotget.pl - perl script for checking out OO source code from CVS
  • buildoo - script to start OO build process. Note: You need to properly edit this file to meet your plateform requirement.
  • smoketestoo - script to start OO smoke test after successful compliation. Note: You need to properly edit this file to meet your plateform requirement.

Please copy these files to slavedir

Edit buildmaster's master.cfg file

Please edit master.cfg file as needed.

e.g. If you are adding a new slave then you need to modify master.cfg to make following entries
1. Make an entry of slavename and password in c['bots'] 
2. Create a new scheduler and builder for buildslave
3. Create a buildfactory of steps that buildslave should follow.
4. Add newly created builder and buildfactory to builderlist c['builders'].

Start the buildmaster and buildslave

Once buildmaster is configured for new buildslave then you can start buildmaster and buildslave by running following command.

buildbot start ''masterdir''
buildbot start ''slavedir''

To stop buildmaster/buildslave anytime, please run

buildbot stop ''masterdir''
buildbot stop ''slavedir''

Commit your changes

If you add any new feature, commit your changes to cvs and notify ooo-staging buildmaster administrator.

Personal tools