Skip to content

Instantly share code, notes, and snippets.

@maio
Created January 14, 2009 12:52
Show Gist options
  • Save maio/46888 to your computer and use it in GitHub Desktop.
Save maio/46888 to your computer and use it in GitHub Desktop.
from buildbot.buildslave import BuildSlave
c['slaves'] = [
BuildSlave("bot1", "bot1passwd"),
]
c['slavePortnum'] = 9989
from buildbot.changes.svnpoller import SVNPoller
def split_netsafe_branches(path):
pieces = path.split('/')
if pieces[0] == 'trunk':
return (None, '/'.join(pieces[1:]))
elif pieces[0] == 'active':
return ('/'.join(pieces[0:2]), '/'.join(pieces[2:]))
elif pieces[0] == 'release':
return ('/'.join(pieces[0:2]), '/'.join(pieces[2:]))
else:
return None
c['change_source'] = SVNPoller(
"https://somehost/svn/devel/home/maio/sandbox/bbtest",
split_netsafe_branches,
pollinterval=10
);
####### SCHEDULERS
## configure the Schedulers
from buildbot.scheduler import Scheduler
c['schedulers'] = [
Scheduler(name="all", branch=None, treeStableTimer=10,
builderNames=["buildbot-full"]),
]
####### BUILDERS
from buildbot.process import factory
from buildbot.steps.source import SVN
from buildbot.steps.shell import Test
f1 = factory.BuildFactory()
f1.addStep(SVN(
baseURL="https://somehost/svn/devel/home/maio/sandbox/bbtest/",
defaultBranch="trunk"
))
f1.addStep(Test(name="perl tests"))
# f1.addStep(Compile(command=["python", "./setup.py", "build"]))
# f1.addStep(Trial(testpath="."))
b1 = {
'name': "buildbot-full",
'slavename': "bot1",
'builddir': "full",
'factory': f1,
}
c['builders'] = [b1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment