Difference between revisions of "Buildbot"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (fix cvs co command)
(Update the broken link to the buildbot configuration file.)
 
(58 intermediate revisions by 14 users not shown)
Line 1: Line 1:
A buildbot is now deployed for OpenOffice.org.
+
The buildbots are hosted by the Apache Software Foundation at
'''http://ooo-staging.osuosl.org:8010/'''
+
'''http://ci.apache.org/projects/openoffice/'''
 +
The buildbot system used is [http://docs.buildbot.net/current/index.html extensively documented].
  
From the Buildbot README: http://buildbot.sourceforge.net/
+
The buildbot is a system to automate the compile/test cycle required by most software projects to validate code changes. With automatic and frequent builds, build problems can be pinpointed quickly, before other developers are inconvenienced by the failure. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not.
  
The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not. Warning counts, lint checks, image size, compile time, and other build parameters can be tracked over time, are more visible, and are therefore easier to improve.
+
==Clean and Incremental Builds==
 +
There are two different types of builds: incremental and clean. Incremental builds only compile files that have been changed since
 +
the last build and reuse object files and libraries of unmodified files where possible.  Clean builds start with removing old build artifacts from the last build. Clean builds take more time to finish than incremental builds.  They are necessary after incompatible changes to the code.  A code change is considered incompatible when it affects files for which the build system does not have a dependency on the modified file.
  
== OpenOffice.org Buildbot ==  
+
==Nightly and Snapshot Builds==
The Buildbot will:
+
The buildbot performs a daily build, also called "nightly build", of the latest revision of trunk. A snapshot build is done once per week for a fixed revision of trunk or one of the branches.
* Build CWS/SVN branches on multiple platforms and make output available to developers
+
* Generate and make available install sets for multiple platforms
+
* Run tests (smoketest, performance tests, etc.) and make test reports available for tracking and regression.  
+
  
== Buildbot vs. Tinderbox ==  
+
===Nightly Builds===
Currently, there is a [[Tinderbox]]. In fact, the Buildbot uses or adapts several Tinderbox scripts. The Buildbot provides several advantages:  
+
Nightly builds are built only for en-US.  Installation sets produced by the nightly builds can be found [http://ci.apache.org/projects/openoffice here]. Direct links for the platforms:
* At-a-glance, customizable statusboard
+
*[http://ci.apache.org/projects/openoffice/#linux64 Linux 64bit]
* Flexible, modular, extensible framework
+
*[http://ci.apache.org/projects/openoffice/#win Windows (32bit)]
* Bots can be commanded and coordinated from the botmaster
+
* (currently out of order) [http://ci.apache.org/projects/openoffice/#linux32 Linux 32bit]
  
Both Buildbots and Tinderboxes are easy to setup and can be behind the firewall. Thanks to [[User:Cloph|Cloph]] for reminding about the similarities.
+
Make sure to check if the build is up to date by looking at the [http://ci.apache.org/projects/openoffice overview].
  
== Deployment & Hardware ==  
+
===Snapshot Builds===
Currently, the botmaster and several buildbots are hosted at OSU-OSL (http://osuosl.org). Additional machines will be added to the pool. Sun QA/RE plans to host a Solaris bot.
+
Snapshot builds are made for these languages:
 +
ar cs da de en-GB en-US es fi fr gd gl hu it ja km ko nb nl pt-BR ru sk sl zh-CN zh-TW
 +
and platforms:
 +
Windows
  
=== Allocation ===
+
Installation sets produced by the latest snapshot build can be found [https://cwiki.apache.org/confluence/display/OOOUSERS/Development+Snapshot+Builds here].
Many buildbot based projects dedicate groups of bots to specific code branches. Thus, for example, checkins to HEAD will automatically trigger the associated pool of machines and the changes built, tested on multiple platforms. See for example: http://www.python.org/dev/buildbot/
+
  
However, this is impractical for OpenOffice.org due the numericity of branches (CWS'es). Instead, we focus on creating a reasonable sized pool of machines for each platform/variant, with flexible build policies (see below).
+
Changing the revision of the snapshot build is run is done by changing the SVN tag named SNAPSHOT:
 +
*Remove the existing tag:
 +
: <code>svn rm https://svn.apache.org/repos/asf/openoffice/tags/SNAPSHOT</code>
 +
*Set the new tag to the desired revision:
 +
: <code>svn copy -r<revision> https://svn.apache.org/repos/asf/openoffice/<trunk-or-branch> https://svn.apache.org/repos/asf/openoffice/tags/SNAPSHOT</code>
  
Currently, bots build for:  
+
==Platform Coverage==
* debian
+
The buildbot coverage differs from platform to platform:
* suse 10.0
+
;Linux 64bit: The nightly build is always a clean build. There are no general known problems with the Linux 64bit builds.
* suse 10.1 (jre and gij)  
+
;Linux 32bit: Currently out of order (due to hardware problems?)
* suse 7.3 (several)
+
;Windows: Clean builds are not reliable.  The exact reasons are not yet known, symptoms are missing header files such as apr.h.
* windows xp (3+)  
+
Nightly builds are incremental builds by default.
 +
Once a week the nightly build is cleaned.
 +
Clean builds can be requested manually (how?).
 +
;Mac: At the moment there are no Mac builds because there is no suitable server for this platform.
  
== Policies ==  
+
==Buildbot Configuration File==
The botmaster will schedule builds based on policies that take into account the pool size, machine status and build time. When a bot is busy doing a build, additional requests are automatically queued.  
+
The [https://svn.apache.org/repos/infra/infrastructure/buildbot2/projects/openofficeorg.py buildbot configuration file]
 +
is available and changable by every committer.
  
* At UTC 0200 + random() build HEAD
+
[[Category:Build_System]]
* At milestone release build milestone
+
* Build manually requested CWS or milestone
+
* Build automatically selected CWS
+
 
+
== Features ==
+
* When no CWS is provided --> checkout HEAD  - '''Done'''
+
* Summaries
+
** tail, warnings, errors, summary log like tinderbox
+
** error - show before/after buffer (15, 5) and skip ... between errors
+
* Deploy install-sets on bot-master
+
* Increase length of status page.
+
* Email notification of build result (fail, success, install, etc. with link to buildlogs)
+
** Send mail to requestor@openoffice.org when finished. (add a hint on the request form)
+
** For CWS - send to CWS owner (from EIS)
+
* Show smoke-test results in status -- currently smoketest fails on Linux.
+
* CWS-Oriented View
+
** Add header X axis (timeline)
+
** Three different views - all, ready for QA, new
+
* Buildslave info on slave web page
+
* Scheduler to prioritize and distribute builds on various slaves
+
** Collect changes by one user (settling) in one build
+
** AllCVS mailing list listener to auto trigger build on commit notification
+
* Header Row - provide number/link to last build (related to status)
+
* Extra config switches field in force build form. Developers can specify some extra configure switches specific to there CWSs. - '''Done'''
+
* Add suse 7.3 buildslave
+
* Generate buildbot results as RSS feed for planetizing
+
* For windows slaves, provide link to html build status page
+
* UserId/Password verification for force build and stop buid
+
 
+
== Steps to add a new buildbot ==
+
Come join the collective! Bots for new platforms or adding bots for for existing platforms will increase the build capabilities available, and are therefore much appreciated.
+
 
+
What you need is a reasonably fast machine, with decent RAM and disk, and of course an Internet connection. It might be easier to first set up the openoffice build environmnet on this machine.
+
 
+
The Buildbot requires:
+
* Python 2.3 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.
+
* The Buildbot has been customized for Openoffice.org builds. Please checkout buildbot-0.7.3 from [http://cvs.gnome.org/viewcvs/ooo-build/scratch/buildbot/ Gnome CVS]. 
+
<pre>
+
cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
+
cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co ooo-build/scratch/configdbbe/buildbot-0.7.3
+
</pre>
+
 
+
Installing the Buildbot:
+
* Note: Detailed instuctions are at http://buildbot.sourceforge.net/manual-0.7.3.html#Requirements
+
* After all requirements are met, install buildbot by running following commands in buildbot directory.
+
* The install may need to be to run as root (su).
+
<pre>
+
python setup.py build
+
python setup.py install                                                                   
+
</pre>
+
* Test installation is proper by running the command
+
<pre>"buildbot --version"</pre>
+
** Install is OK if you see the version information for Buildbot and Twisted.
+
** Errors such as 'no such command' or "ImportError" means something went wrong.
+
** Note: For more detailed instuctions see http://buildbot.sourceforge.net/manual-0.7.3.html#Installing-the-code
+
 
+
Setting up the Buildbot:
+
* mkdir ''slavedir'' 
+
** Note : preferable name of ''slavedir'' : buildslave_ooostaging
+
* create a buildslave by running command:
+
  buildbot slave ''slavedir'' ''MASTERHOST'':''PORT'' ''SLAVENAME'' ''PASSWORD''
+
** where, MASTERHOST = ooo-staging.osuosl.org and PORT = 9989
+
** Note : You need to report ''SLAVENAME'' and ''PASSWORD'' to buildmaster administrator
+
** Note: For more detailed instuctions see [http://buildbot.sourceforge.net/manual-0.7.3.html#Creating-a-buildslave]
+
** You can specify certain options while creating buildslave. see [http://buildbot.sourceforge.net/manual-0.7.3.html#Buildslave-Options]
+
 
+
* 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: OS, version, memory size, CPU speed, versions of relevant libraries installed, and finally the version of the buildbot code which is running the buildslave.
+
* Checkout some OO buildslave specific scripts from [http://cvs.gnome.org/viewcvs/ooo-build/scratch/buildbot/slave/]
+
** 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.
+
* Once all the above steps are done, You need to email buildmaster administrator following stuff:
+
** ''SLAVENAME'' & ''PASSWORD'' : This is the same that you used while creating buildslave.
+
** Full path of the ''slavedir'' e.g. /home/bbot/buildslave_ooostaging
+
** platform specific configure command used for configuring OO.
+
  e.g. ./configure --with-system-freetype
+
* Once buildmaster administrator receives this above information, he will add your buildslave to buildfarm and then your slave will become OOBuildSlave and will be listed on buildmaster status page [http://ooo-staging.osuosl.org:8010]
+
 
+
== People ==
+
* Prasad Madhav (pmadhav) deployed and customizes the buildbot
+
* mikeleib, kaib, vq, dkeskar support and provide ideas
+

Latest revision as of 05:38, 15 January 2023

The buildbots are hosted by the Apache Software Foundation at http://ci.apache.org/projects/openoffice/ The buildbot system used is extensively documented.

The buildbot is a system to automate the compile/test cycle required by most software projects to validate code changes. With automatic and frequent builds, build problems can be pinpointed quickly, before other developers are inconvenienced by the failure. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not.

Clean and Incremental Builds

There are two different types of builds: incremental and clean. Incremental builds only compile files that have been changed since the last build and reuse object files and libraries of unmodified files where possible. Clean builds start with removing old build artifacts from the last build. Clean builds take more time to finish than incremental builds. They are necessary after incompatible changes to the code. A code change is considered incompatible when it affects files for which the build system does not have a dependency on the modified file.

Nightly and Snapshot Builds

The buildbot performs a daily build, also called "nightly build", of the latest revision of trunk. A snapshot build is done once per week for a fixed revision of trunk or one of the branches.

Nightly Builds

Nightly builds are built only for en-US. Installation sets produced by the nightly builds can be found here. Direct links for the platforms:

Make sure to check if the build is up to date by looking at the overview.

Snapshot Builds

Snapshot builds are made for these languages:

ar cs da de en-GB en-US es fi fr gd gl hu it ja km ko nb nl pt-BR ru sk sl zh-CN zh-TW

and platforms:

Windows

Installation sets produced by the latest snapshot build can be found here.

Changing the revision of the snapshot build is run is done by changing the SVN tag named SNAPSHOT:

  • Remove the existing tag:
svn rm https://svn.apache.org/repos/asf/openoffice/tags/SNAPSHOT
  • Set the new tag to the desired revision:
svn copy -r<revision> https://svn.apache.org/repos/asf/openoffice/<trunk-or-branch> https://svn.apache.org/repos/asf/openoffice/tags/SNAPSHOT

Platform Coverage

The buildbot coverage differs from platform to platform:

Linux 64bit
The nightly build is always a clean build. There are no general known problems with the Linux 64bit builds.
Linux 32bit
Currently out of order (due to hardware problems?)
Windows
Clean builds are not reliable. The exact reasons are not yet known, symptoms are missing header files such as apr.h.

Nightly builds are incremental builds by default. Once a week the nightly build is cleaned. Clean builds can be requested manually (how?).

Mac
At the moment there are no Mac builds because there is no suitable server for this platform.

Buildbot Configuration File

The buildbot configuration file is available and changable by every committer.

Personal tools