
URL: https://svn.lrde.epita.fr/svn/lrde-tools/trunk/buildbot/masters ChangeLog: 2007-11-21 Benoit Sigoure <tsuna@lrde.epita.fr> Add a buildfarm for Spot. * www/index.php: Link to the new WebStatus. * spot_master.cfg: New. * create_buildmaster.sh: Adjust an echo message. * apache_bf.conf: Add a reverse proxy for the new WebStatus. * buildfactory.py: Make the `SCM checkout' step overridable (oh boy, Spot is still on CVS). --- diffstat not available Index: trunk/buildbot/masters/www/index.php =================================================================== --- trunk/buildbot/masters/www/index.php (revision 471) +++ trunk/buildbot/masters/www/index.php (revision 472) @@ -12,6 +12,7 @@ <li><a href="buildfarm/oln/">Olena (trunk)</a></li> <li><a href="buildfarm/vaucanson/">Vaucanson (trunk)</a></li> <li><a href="buildfarm/vaucanson-bmi/">Vaucanson (bmi)</a></li> + <li><a href="buildfarm/spot/">Spot</a></li> </ul> <h2>Latest builds</h2> <a href="/releases/"><strong>All releases</strong></a> Index: trunk/buildbot/masters/create_buildmaster.sh =================================================================== --- trunk/buildbot/masters/create_buildmaster.sh (revision 471) +++ trunk/buildbot/masters/create_buildmaster.sh (revision 472) @@ -290,6 +290,6 @@ svn diff $BUILDFARM_WC And once it's fine for you: svn commit $BUILDFARM_WC --username <your_username> - buildbot start `pwd`/$bb_dir_name + buildbot start $BUILDBOT_ROOT/$bb_dir_name Make sure you patched Apache's configuration and restared it. Note: You still have to create build slaves on the builders!" Index: trunk/buildbot/masters/apache_bf.conf =================================================================== --- trunk/buildbot/masters/apache_bf.conf (revision 471) +++ trunk/buildbot/masters/apache_bf.conf (revision 472) @@ -33,4 +33,7 @@ ProxyPass /buildfarm/vaucanson-bmi/ http://127.0.0.1:8044/ ProxyPassReverse /buildfarm/vaucanson-bmi/ http://127.0.0.1:8044/ + + ProxyPass /buildfarm/spot/ http://127.0.0.1:8045/ + ProxyPassReverse /buildfarm/spot/ http://127.0.0.1:8045/ </IfModule> Index: trunk/buildbot/masters/buildfactory.py =================================================================== --- trunk/buildbot/masters/buildfactory.py (revision 471) +++ trunk/buildbot/masters/buildfactory.py (revision 472) @@ -49,7 +49,7 @@ def __init__ (self, project_repos, project_name="", kernel_path=None, extra_configure_args="", - bootstrap_cmd="", configure_cmd="", + scm_step="", bootstrap_cmd="", configure_cmd="", compile_cmd="", check_cmd="", install_cmd="", install_dir=None, upload_cmd="", distcheck_cmd="", distcheck_configure_args="", dist_cmd="", extra_path=None, branch="", @@ -100,9 +100,12 @@ description='fixing perms', descriptionDone='fix perms', name='perms') + if scm_step == "": self.addStep(scm.SVN, baseURL=base_svn_url + project_repos + '/', defaultBranch=self.branch, mode='copy') + elif scm_step is not None: + self.addStep(scm_step) if install_dir is None or install_dir == "": self.install_dir = self.project_name @@ -287,7 +290,7 @@ """ def __init__ (self, project_repos, - project_name="", extra_qmake_args="", + project_name="", extra_qmake_args="", scm_step="", bootstrap_cmd=None, configure_cmd="", compile_cmd="", check_cmd=None, install_cmd=None, install_dir=None, upload_cmd=None, extra_path=None, branch=""): @@ -320,9 +323,12 @@ if self.branch == "": self.branch = 'trunk'; + if scm_step == "": self.addStep(scm.SVN, baseURL=base_svn_url + project_repos + '/', defaultBranch=self.branch, mode='copy') + elif scm_step is not None: + self.addStep(scm_step) if bootstrap_cmd == "": self.bootstrap_cmd = './bootstrap' @@ -394,7 +400,7 @@ def __init__ (self, project_repos, project_name="", extra_scons_args="", - compile_cmd="", + scm_step="", compile_cmd="", check_cmd=None, install_cmd="", install_dir=None, upload_cmd=None, extra_path=None, branch=""): """ @@ -426,9 +432,12 @@ if self.branch == "": self.branch = 'trunk'; + if scm_step == "": self.addStep(scm.SVN, baseURL=base_svn_url + project_repos + '/', defaultBranch=self.branch, mode='copy') + elif scm_step is not None: + self.addStep(scm_step) if compile_cmd == "": self.compile_cmd = 'scons ' + self.extra_scons_args Index: trunk/buildbot/masters/spot_master.cfg =================================================================== --- trunk/buildbot/masters/spot_master.cfg (revision 0) +++ trunk/buildbot/masters/spot_master.cfg (revision 472) @@ -0,0 +1,205 @@ +# -*- python -*- +# ex: set syntax=python: +# vi: set ft=python: +# Doc @ http://buildbot.sourceforge.net/manual-0.7.4.html#Config-File-Format + +c = BuildmasterConfig = {} + +####### PROJECT IDENTITY +# http://buildbot.sourceforge.net/manual-0.7.4.html#Defining-the-Project + +c['projectName'] = 'Spot' +c['projectURL'] = 'https://spot.lrde.org/' + +# the 'buildbotURL' string should point to the location where the buildbot's +# internal web server (usually the html.Waterfall page) is visible. This +# typically uses the port number set in the Waterfall 'status' entry, but +# with an externally-visible host name which the buildbot cannot figure out +# without some help. + +c['buildbotURL'] = 'https://build.lrde.org/buildfarm/spot/' + +# 'slavePortnum' defines the TCP port to listen on. This must match the value +# configured into the buildslaves (with their --master option) + +c['slavePortnum'] = 9945 + +####### CHANGESOURCES +# http://buildbot.sourceforge.net/manual-0.7.4.html#Listing-Change-Sources-and... +# http://buildbot.sourceforge.net/manual-0.7.4.html#Getting-Source-Code-Change... + +# the 'change_source' list tells the buildmaster how it should find out about +# source code changes. Any class which implements IChangeSource can be added +# to this list: there are several in buildbot/changes/*.py to choose from. + +import buildbot.changes.pb +c['change_source'] = [buildbot.changes.pb.PBChangeSource()] + +####### SCHEDULERS +# http://buildbot.sourceforge.net/manual-0.7.4.html#Listing-Change-Sources-and... + +## configure the Schedulers + +from buildbot.scheduler import AnyBranchScheduler +c['schedulers'] = [] +c['schedulers'].append(AnyBranchScheduler(name='all', branches=None, + treeStableTimer=10*60, + # When a change occurs, wait 10 minutes before + # lunching the build. + builderNames=['mingw32-gcc-3.4.5', + 'winxp-vcxx8', + 'powerpc-apple-darwin8-gcc-4.0.1', + 'i686-apple-darwin8-gcc-4.0.1', + 'i486-linux-gnu-gcc-4.1', + 'i486-linux-gnu-gcc-3.3'])) + + +####### BUILDSLAVES +# http://buildbot.sourceforge.net/manual-0.7.4.html#Buildslave-Specifiers + +# the 'slaves' list defines the set of allowable buildslaves. Each element is a +# tuple of bot-name and bot-password. These correspond to values given to the +# buildslave's mktap invocation. +from buildbot.buildslave import BuildSlave +c['slaves'] = [BuildSlave('bot-winxp-mingw', 'RG,[{^a+]}aP,]'), + BuildSlave('bot-winxp-vcxx', 'I|(_b;)p*mZa0,'), + BuildSlave('bot-macppc', '!j<L%Q2@xb|zha'), + BuildSlave('bot-macx86', '.+rp+-D|(L#r-x'), + BuildSlave('bot-linux-gcc3', 'Y#j:6:3"Ep1_vV'), + BuildSlave('bot-linux-gcc4', ':.(cW/W!sh5#X]'), + ] + +####### BUILDERS +# http://buildbot.sourceforge.net/manual-0.7.4.html#Defining-Builders + +# the 'builders' list defines the Builders. Each one is configured with a +# dictionary, using the following keys: +# name (required): the name used to describe this bilder +# slavename (required): which slave to use, must appear in c['slaves'] +# builddir (required): which subdirectory to run the builder in +# factory (required): a BuildFactory to define how the build is run + +# buildbot/process/factory.py provides several BuildFactory classes you can +# start with, which implement build processes for common targets (GNU +# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the +# base class, and is configured with a series of BuildSteps. When the build +# is run, the appropriate buildslave is told to execute each Step in turn. + +# the first BuildStep is typically responsible for obtaining a copy of the +# sources. There are source-obtaining Steps in buildbot/process/step.py for +# CVS, SVN, and others. + +builders = [] +from buildfactory import GNUBuildSystem +from buildbot.steps.source import CVS +checkout = CVS(cvsroot='anonymous@minium.lip6.fr:/Volumes/CVS/repository/spot', + cvsmodule='spot') + +f_spot_unix = GNUBuildSystem(project_repos='spot', + scm_step=checkout, + bootstrap_cmd='autoreconf -fvi') + +f_spot_unix_gcc3 = GNUBuildSystem(project_repos='spot', + scm_step=checkout, + bootstrap_cmd='autoreconf -fvi', + extra_configure_args='CC=gcc-3.3 CXX=g++-3.3', + install_dir='spot_gcc3') + +f_spot_mingw = GNUBuildSystem(project_repos='spot', + scm_step=checkout, + bootstrap_cmd='autoreconf -fvi', + extra_configure_args='--host=mingw32 --build=i686-pc-cygwin') + +f_spot_vcxx = GNUBuildSystem(project_repos='spot', + scm_step=checkout, + bootstrap_cmd='autoreconf -fvi', + extra_configure_args='''CC=cccl CXX=cccl LD=cccl \\ + && sed "s/^host=.*/host=\'i686-pc-msvc++8\'/" -i config.log''') + +builder_spot_winxp_mingw = {'name': 'mingw32-gcc-3.4.5', + 'slavename': 'bot-winxp-mingw', + 'builddir': 'spot_winxp_mingw', + 'factory': f_spot_mingw + } +builder_spot_winxp_vcxx = {'name': 'winxp-vcxx8', + 'slavename': 'bot-winxp-vcxx', + 'builddir': 'spot_winxp_vcxx', + 'factory': f_spot_vcxx + } +builder_spot_macppc = {'name': 'powerpc-apple-darwin8-gcc-4.0.1', + 'slavename': 'bot-macppc', + 'builddir': 'spot_macppc', + 'factory': f_spot_unix + } +builder_spot_macx86 = {'name': 'i686-apple-darwin8-gcc-4.0.1', + 'slavename': 'bot-macx86', + 'builddir': 'spot_macx86', + 'factory': f_spot_unix + } +builder_spot_linux_gcc4 = {'name': 'i486-linux-gnu-gcc-4.1', + 'slavename': 'bot-linux-gcc4', + 'builddir': 'spot_linux_gcc4', + 'factory': f_spot_unix + } +builder_spot_linux_gcc3 = {'name': 'i486-linux-gnu-gcc-3.3', + 'slavename': 'bot-linux-gcc3', + 'builddir': 'spot_linux_gcc3', + 'factory': f_spot_unix_gcc3 + } + +c['builders'] = [builder_spot_winxp_mingw, + builder_spot_winxp_vcxx, + builder_spot_macppc, + builder_spot_macx86, + builder_spot_linux_gcc3, + builder_spot_linux_gcc4, + ] + +####### STATUS TARGETS +# http://buildbot.sourceforge.net/manual-0.7.4.html#Status-Delivery + +# 'status' is a list of Status Targets. The results of each build will be +# pushed to these targets. buildbot/status/*.py has a variety to choose from, +# including web pages, email senders, and IRC bots. + +c['status'] = [] + +from buildbot.status import html +from buildbot.status.web.authentication import LDAPAuth +c['status'].append(html.WebStatus(http_port="tcp:8045:interface=127.0.0.1", + allowForce=True, + auth=LDAPAuth('beyrouth.lrde.epita.fr', + 'ou=people,dc=lrde,dc=epita,dc=fr'))) + +from buildbot.status import mail +c['status'].append(mail.MailNotifier(fromaddr="buildbot@lrde.epita.fr", + lookup="lrde.epita.fr", + mode="problem", + sendToInterestedUsers=True)) +# +# from buildbot.status import words +# c['status'].append(words.IRC(host="irc.example.com", nick="bb", +# channels=["#example"])) +# +# from buildbot.status import client +# c['status'].append(client.PBListener(9988)) + + +####### DEBUGGING OPTIONS + +# if you set 'debugPassword', then you can connect to the buildmaster with +# the diagnostic tool in contrib/debugclient.py . From this tool, you can +# manually force builds and inject changes, which may be useful for testing +# your buildmaster without actually commiting changes to your repository (or +# before you have a functioning 'change_source' set up). The debug tool uses the +# same port number as the slaves do: 'slavePortnum'. + +#c['debugPassword'] = "debugpassword" + +# if you set 'manhole', you can ssh into the buildmaster and get an +# interactive python shell, which may be useful for debugging buildbot +# internals. It is probably only useful for buildbot developers. You can also +# use an authorized_keys file, or plain telnet. +#from buildbot import manhole +#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1", +# "admin", "password")