summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2015-09-05 19:32:16 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2015-09-05 19:32:16 +0100
commit7a3bb48bb22bc1bacdcd4682a7d759f38ca5f94e (patch)
treecbb9fa66ef349a022c8c7977bf8d2afdbb0e9db4
parentf70522e5ebb52030132c2a0357371bc0fcb18845 (diff)
More work
-rw-r--r--gitmaildirsource.py9
-rwxr-xr-xmaster.cfg23
-rwxr-xr-xmodulesetparser.py (renamed from moduleset_parser.py)8
3 files changed, 22 insertions, 18 deletions
diff --git a/gitmaildirsource.py b/gitmaildirsource.py
index 2cfe4d3..def27cd 100644
--- a/gitmaildirsource.py
+++ b/gitmaildirsource.py
@@ -82,7 +82,8 @@ class GitMaildirSource(MaildirSource):
# map from the short repository name to the repository path
for k in repopathmap:
if repository in repopathmap[k]:
- repository = k + '/' + repository
+ if k != '':
+ repository = k + '/' + repository
break
log.msg("repo name mapped to path '%s'" % repository)
@@ -90,10 +91,10 @@ class GitMaildirSource(MaildirSource):
repository = repobaseurl + repository
log.msg("repo URL '%s'" % repository)
- # Iterate over all the lines in the message, getting values for
- # single-line variables (author, branch).
+ # Iterate over all the lines in the message
for line in body_line_iterator(m, decode=True):
-# log.msg("%s " % (line))
+ line = unicode(line, m.get_content_charset() or 'ascii', 'ignore)
+ log.msg("%s " % (line))
# Mails sent by post-receive-email hook may contain more than
# one commit, meaning that there may be several authors. After
diff --git a/master.cfg b/master.cfg
index 596cfeb..0fe09c2 100755
--- a/master.cfg
+++ b/master.cfg
@@ -12,9 +12,9 @@ c = BuildmasterConfig = {}
# slave name and password must be configured on the slave.
from buildbot.buildslave import BuildSlave
-import slavepasswords
+from passwords import SlavePassword
-c['slaves'] = [BuildSlave("allegra", slavepasswords.password, max_builds=1)]
+c['slaves'] = [BuildSlave("allegra", SlavePassword("allegra"), max_builds=1)]
# 'protocols' contains information about protocols which master will use for
# communicating with slaves.
@@ -26,12 +26,12 @@ c['protocols'] = {'pb': {'port': 9989}}
####### CHANGESOURCES
-import gitmaildirsource
-import moduleset_parser
+from gitmaildirsource import GitMaildirSource
+from modulesetparser import ChangeSourceList, SchedulerList, BuilderList
c['change_source'] = []
-c['change_source'].append(gitmaildirsource.GitMaildirSource('/var/lib/buildbot/Maildir'))
-c['change_source'].extend(moduleset_parser.changesources())
+c['change_source'].append(GitMaildirSource('/var/lib/buildbot/Maildir'))
+c['change_source'].extend(ChangeSourceList())
####### REVLINKS
@@ -47,7 +47,7 @@ c['revlink'] = RevlinkMatch([r'git://anongit.freedesktop.org/git/(.*)'],
# Configure the Schedulers, which decide how to react to incoming changes.
c['schedulers'] = []
-c['schedulers'].extend(moduleset_parser.schedulers())
+c['schedulers'].extend(SchedulerList())
####### BUILDERS
@@ -56,7 +56,7 @@ c['schedulers'].extend(moduleset_parser.schedulers())
# only take place on one slave.
c['builders'] = []
-c['builders'].extend(moduleset_parser.builders(['allegra']))
+c['builders'].extend(BuilderList(['allegra']))
####### STATUS TARGETS
@@ -87,6 +87,7 @@ c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg, order_console
# an irc bot which reports build status
from buildbot.status import words
+
irc = words.IRC("chat.freenode.org", "xbot",
channels=["cygwinx"],
notify_events={
@@ -94,8 +95,10 @@ irc = words.IRC("chat.freenode.org", "xbot",
'successToFailure': 1,
'failureToSuccess': 1,
},
+ pm_to_nicks=["jturney"],
allowForce=True)
-#c['status'].append(irc)
+
+c['status'].append(irc)
####### PROJECT IDENTITY
@@ -112,7 +115,7 @@ c['titleURL'] = "http://www.x.org/"
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
-c['buildbotURL'] = "http://localhost:8010/"
+c['buildbotURL'] = "http://wollstonecraft:8010/"
####### DB URL
diff --git a/moduleset_parser.py b/modulesetparser.py
index 46d57e4..388c0b9 100755
--- a/moduleset_parser.py
+++ b/modulesetparser.py
@@ -168,7 +168,7 @@ def get_repo(b):
return repo
-def changesources():
+def ChangeSourceList():
parse()
result = []
@@ -194,7 +194,7 @@ def changesources():
return result
-def schedulers():
+def SchedulerList():
parse()
result = []
@@ -232,7 +232,7 @@ def schedulers():
return result
-def builders(slaves):
+def BuilderList(slaves):
parse()
result = []
@@ -358,7 +358,7 @@ def builders(slaves):
factory.addStep(Compile(logEnviron=logEnviron, env=env))
if not (m.get('check-target') == 'false'):
- factory.addStep(Compile(command=['make', 'check'], name='test', description='testing', descriptionDone='test', logEnviron=logEnviron, env=env))
+ factory.addStep(Compile(command=['make', 'check'], name='test', description='testing', descriptionDone='test', logEnviron=logEnviron, env=env, timeout=3600))
factory.addStep(Compile(command=['make', 'install'], name='install', description='installing', descriptionDone='install', logEnviron=logEnviron, env=env))