[Xfce4-commits] <xfce-buildbot-scripts:master> start automating creating new buildmasters

Samuel Verstraete noreply at xfce.org
Thu Oct 22 16:26:01 CEST 2009


Updating branch refs/heads/master
         to 6ac5df312579d54f134471ff17ac8ff613f1c8d7 (commit)
       from d625d189305268b14396d3e7940e51b3913bd984 (commit)

commit 6ac5df312579d54f134471ff17ac8ff613f1c8d7
Author: Samuel Verstraete <samuel.verstraete at gmail.com>
Date:   Thu Oct 22 11:29:58 2009 +0200

    start automating creating new buildmasters

 trunk/XfceBuilder.py |   14 ++++++
 trunk/template.cfg   |  115 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+), 0 deletions(-)

diff --git a/trunk/XfceBuilder.py b/trunk/XfceBuilder.py
new file mode 100644
index 0000000..192b0f0
--- /dev/null
+++ b/trunk/XfceBuilder.py
@@ -0,0 +1,14 @@
+slaveList = ['debian','lunar']
+password = '*****************'
+
+defaults = { 'period' : 1440 * 60, 'branch': 'master' }
+
+thunarConfig = { 
+  'name': 'thunar', 
+  'category': 'xfce', 
+  'branch': defaults['branch'], 
+  'period': defaults['period'], 
+  'slavePort': 9991, 
+  'webStatusPort': 8821,
+  'pbStatusPort' : 9992
+}
diff --git a/trunk/template.cfg b/trunk/template.cfg
new file mode 100644
index 0000000..d3022a0
--- /dev/null
+++ b/trunk/template.cfg
@@ -0,0 +1,115 @@
+# ex: set syntax=python:
+
+# definition of the available buildslaves is commonly available
+import sys
+sys.path.append('/etc/buildbot')
+import XfceBuilder
+
+# variables
+config = XfceBuilder.xxxConfig
+module = config['name']
+category = config['category']
+slavePort = config['slavePort']
+webStatusPort = config['webStatusPort']
+pbStatusPort = config['pbStatusPort']
+period = config['period']
+branch = config['branch']
+
+password = XfceBuilder.password
+slaveList = XfceBuilder.slaveList
+
+# bunch of imports
+from buildbot.steps import source,shell
+from buildbot.process import factory
+from buildbot.buildslave import BuildSlave
+from buildbot.changes.pb import PBChangeSource
+from buildbot.scheduler import Scheduler,Periodic
+from twisted.python import log
+from buildbot.status import html
+from buildbot.status import client
+
+c = BuildmasterConfig = {}
+
+####### BUILDSLAVES
+c['slaves'] = []
+for slave in slaveList:
+  c['slaves'].append(BuildSlave(slave, password, max_builds=1))
+
+# 'slavePortnum' defines the TCP port to listen on. This must match the value
+# configured into the buildslaves (with their --master option)
+
+c['slavePortnum'] = slavePort
+
+####### CHANGESOURCES
+
+# the 'change_source' setting tells the buildmaster how it should find out
+# about source code changes. Any class which implements IChangeSource can be
+# put here: there are several in buildbot/changes/*.py to choose from.
+
+c['change_source'] = PBChangeSource()
+
+####### SCHEDULERS
+## configure the Schedulers
+
+c['schedulers'] = []
+
+for slave in slaveList:
+  prefix = category + '_' + module + '_' + slave
+  schedule=Scheduler(name=prefix + '_on_demand', branch='master', treeStableTimer=600, builderNames=[prefix])
+  c['schedulers'].append(schedule)
+  periodic=Periodic(prefix + '_periodic',[prefix], period)
+  c['schedulers'].append(periodic)
+
+####### BUILDERS
+
+c['builders'] = []
+prefix= '/home/buildbot/xfce-install'
+path='/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11/bin:/usr/games:/lib/module-init-tools/sbin:/lib/module-init-tools/bin:.:'+prefix+'/bin'
+pkgconfigpath='/usr/lib/pkgconfig:'+prefix+'/lib/pkgconfig'
+xdgdatadirs='/usr/share:/usr/local/share:'+prefix+'/share'
+environment={'PATH':path, 'PKG_CONFIG_PATH':pkgconfigpath, 'XDG_DATA_DIRS': xdgdatadirs }
+for slave in slaveList: 
+  url = 'git://git.xfce.org/' + category + '/' + module
+  Factory = factory.BuildFactory()
+  Factory.addStep(source.Git(repourl=url, branch=branch))
+  Factory.addStep(shell.ShellCommand(name='configure', command=['./autogen.sh','--prefix='+prefix,'--enable-debug=full','--enable-gtk-doc','--enable-xml2po','--enable-xsltproc'], env=environment))
+  Factory.addStep(shell.ShellCommand(name='make distcheck', command=['make','distcheck'],env=environment))
+  Factory.addStep(shell.ShellCommand(name='make', command=['make'],env=environment))
+  Factory.addStep(shell.ShellCommand(name='make install', command=['make','install'],env=environment))
+  Factory.addStep(shell.ShellCommand(name='chmod +w', command=['chmod','-R','u+w', './'], env=environment))
+  Builder = {'name': category + '_' + module + '_' + slave, 'slavename': slave, 'builddir': category + '/' + slave + '_for_' + module, 'factory': Factory, }
+  c['builders'].append(Builder)
+
+####### STATUS TARGETS
+
+c['status'] = []
+
+#c['status'].append(html.WebStatus(http_port=8020))
+c['status'].append(html.WebStatus(http_port='tcp:' + webStatusPort + ':interface=127.0.0.1', allowForce=True))
+
+# from buildbot.status import mail
+# c['status'].append(mail.MailNotifier(fromaddr='buildbot at localhost',
+#                                      extraRecipients=['builds at example.com'],
+#                                      sendToInterestedUsers=False))
+#
+# from buildbot.status import words
+# c['status'].append(words.IRC(host='irc.example.com', nick='bb',
+#                              channels=['#example']))
+#
+c['status'].append(client.PBListener(pbStatusPort))
+
+
+####### DEBUGGING OPTIONS
+#c['debugPassword'] = 'debugpassword'
+#from buildbot import manhole
+#c['manhole'] = manhole.PasswordManhole('tcp:9999:interface=127.0.0.1',
+#                                       'admin', 'password')
+
+
+####### PROJECT IDENTITY
+c['projectName'] = category + '_' + module
+c['projectURL'] = 'http://buildbot.xfce.org/' + category + '/' + module
+c['buildbotURL'] = 'http://buildbot.xfce.org/' + category + '/' + module
+
+
+



More information about the Xfce4-commits mailing list