Added the buildbot config file to the repository. Deployment path: /home/buildbot/masters/datatracker/master.cfg

- Legacy-Id: 9244
This commit is contained in:
Henrik Levkowetz 2015-03-19 12:01:42 +00:00
parent 70396be450
commit a5a56597f5

View file

@ -1,8 +1,7 @@
# -*- python -*- # -*- python -*-
# ex: set syntax=python: # ex: set syntax=python:
from buildbot_passwords import *
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
# This is the dictionary that the buildmaster pays attention to. We also use # This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing. # a shorter alias to save typing.
@ -15,9 +14,10 @@ c = BuildmasterConfig = {}
# slave name and password must be configured on the slave. # slave name and password must be configured on the slave.
from buildbot.buildslave import BuildSlave from buildbot.buildslave import BuildSlave
c['slaves'] = [ c['slaves'] = [
BuildSlave("datatracker_py27_1", "yWQaUzdJk8oL"), BuildSlave("datatracker_lin_py27_1", datatracker_lin_py27_1_pw),
BuildSlave("datatracker_py27_2", "nm+=+knVGycN"), BuildSlave("datatracker_lin_py27_2", datatracker_lin_py27_2_pw),
BuildSlave("datatracker_py27_3", "WZgYahJ4twXR"), BuildSlave("datatracker_lin_py27_3", datatracker_lin_py27_3_pw),
BuildSlave("datatracker_osx_py27_4", datatracker_osx_py27_4_pw),
] ]
# 'protocols' contains information about protocols which master will use for # 'protocols' contains information about protocols which master will use for
@ -41,7 +41,7 @@ from buildbot.changes.pb import PBChangeSource
# prefix = userinfo[user]["prefix"] # prefix = userinfo[user]["prefix"]
# c.['change_source'].append(PBChangeSource(user=user, passwd="BRiR6XcT7x3$", prefix=prefix)) # c.['change_source'].append(PBChangeSource(user=user, passwd="BRiR6XcT7x3$", prefix=prefix))
c['change_source'] = [ c['change_source'] = [
PBChangeSource(user="ietfdb", passwd="BRiR6XcT7x3$"), PBChangeSource(user="ietfdb", passwd=ietfdb_svn_hook_pw),
] ]
####### SCHEDULERS ####### SCHEDULERS
@ -53,9 +53,10 @@ from buildbot.schedulers.basic import SingleBranchScheduler, AnyBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.changes import filter from buildbot.changes import filter
c['schedulers'] = [ c['schedulers'] = [
AnyBranchScheduler(name="pyflakes", treeStableTimer=10, builderNames=["run_pyflakes"]), AnyBranchScheduler(name="pyflakes", treeStableTimer=10, builderNames=["Check PyFlakes"]),
AnyBranchScheduler(name="test", treeStableTimer=60*10, builderNames=["run_tests"]), AnyBranchScheduler(name="lin_test", treeStableTimer=60*5, builderNames=["Test Suite"]),
SingleBranchScheduler(name="crawler", treeStableTimer=60*60*4, builderNames=["run_crawler"], AnyBranchScheduler(name="osx_test", treeStableTimer=60*5, builderNames=["Test Suite (OS X)"]),
SingleBranchScheduler(name="crawler", treeStableTimer=60*60*4, builderNames=["Test-Crawler"],
change_filter=filter.ChangeFilter(branch='trunk')), change_filter=filter.ChangeFilter(branch='trunk')),
] ]
@ -67,80 +68,160 @@ c['schedulers'] = [
from buildbot.process.factory import BuildFactory from buildbot.process.factory import BuildFactory
from buildbot.steps.source.svn import SVN from buildbot.steps.source.svn import SVN
from buildbot.steps.shell import ShellCommand from buildbot.steps.shell import ShellCommand, Test, WarningCountingShellCommand
from buildbot.steps.python import PyFlakes from buildbot.steps.python import PyFlakes
from buildbot.steps.python_twisted import RemovePYCs
#
from buildbot.process.properties import Property, Interpolate from buildbot.process.properties import Property, Interpolate
from buildbot.config import BuilderConfig from buildbot.config import BuilderConfig
#### Custom subclassed builder
class TestCrawlerShellCommand(WarningCountingShellCommand):
name = "testcrawl"
haltOnFailure = 1
flunkOnFailure = 1
descriptionDone = ["test crawler"]
command=["bin/test-crawl"]
warningPattern = '.* FAIL'
## Set up builders
c['builders'] = [] c['builders'] = []
# Run pyflakes # --- Run pyflakes ---
factory = BuildFactory() factory = BuildFactory()
factory.addStep(SVN( factory.addStep(SVN(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, username='buildbot@tools.ietf.org',
descriptionDone="svn update",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'), repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'),
descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')], descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')],
)) ))
factory.addStep(RemovePYCs(workdir=Interpolate('build/%(src::branch)s')))
factory.addStep(ShellCommand( factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, descriptionDone="install requirements",
command=["pip", "install", "-r", "requirements.txt"])) workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"],
))
factory.addStep(PyFlakes( factory.addStep(PyFlakes(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, workdir=Interpolate('build/%(src::branch)s'),
command=["ietf/manage.py", "pyflakes", "--verbosity=0"])) haltOnFailure=True,
command=["ietf/manage.py", "pyflakes", "--verbosity=0"],
))
# This should be the last action # This should be the last action
factory.addStep(ShellCommand(descriptionDone="mark as passed", factory.addStep(ShellCommand(
descriptionDone="mark as passed",
workdir=Interpolate('build/%(src::branch)s'), workdir=Interpolate('build/%(src::branch)s'),
command=["svn", "--username=buildbot@tools.ietf.org", "--password=ax+u#ikxabx7", command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"--no-auth-cache", "--non-interactive", "propset", "--revprop", "-r", Property('got_revision'), "test:pyflakes", "passed" ],
"propset", "--revprop", "-r", Property('got_revision'), "test:pyflakes", "passed" ])) ))
c['builders'].append(BuilderConfig(name="run_pyflakes", factory=factory, c['builders'].append(BuilderConfig(name="Check PyFlakes", factory=factory,
slavenames=["datatracker_py27_1", "datatracker_py27_2", "datatracker_py27_3"])) slavenames=["datatracker_lin_py27_1", "datatracker_lin_py27_2", "datatracker_lin_py27_3"]))
# Run tests # --- Run tests ---
factory = BuildFactory() factory = BuildFactory()
factory.addStep(SVN( factory.addStep(SVN(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, username='buildbot@tools.ietf.org',
descriptionDone="svn update",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'), repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'),
descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')], descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')],
)) ))
factory.addStep(RemovePYCs(workdir=Interpolate('build/%(src::branch)s')))
factory.addStep(ShellCommand( factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, descriptionDone="install requirements",
command=["pip", "install", "-r", "requirements.txt"])) workdir=Interpolate('build/%(src::branch)s'),
factory.addStep(ShellCommand( haltOnFailure=True,
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, command=["pip", "install", "-r", "requirements.txt"],
command=["ietf/manage.py", "test", "--settings=settings_sqlitetest"])) ))
factory.addStep(Test(
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["ietf/manage.py", "test", "--settings=settings_sqlitetest"],
))
# This should be the last action # This should be the last action
factory.addStep(ShellCommand(descriptionDone="mark as passed", factory.addStep(ShellCommand(
descriptionDone="mark as passed",
workdir=Interpolate('build/%(src::branch)s'), workdir=Interpolate('build/%(src::branch)s'),
command=["svn", "--username=buildbot@tools.ietf.org", "--password=ax+u#ikxabx7", command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"--no-auth-cache", "--non-interactive", "propset", "--revprop", "-r", Property('got_revision'), "test:unittest", "passed" ],
"propset", "--revprop", "-r", Property('got_revision'), "test:unittest", "passed" ])) ))
c['builders'].append(BuilderConfig(name="run_tests", factory=factory, c['builders'].append(BuilderConfig(name="Test Suite", factory=factory,
slavenames=["datatracker_py27_1", "datatracker_py27_2", "datatracker_py27_3"])) slavenames=["datatracker_lin_py27_1", "datatracker_lin_py27_2", "datatracker_lin_py27_3"]))
# Run test-crawler
# --- Run tests on os-x ---
factory = BuildFactory() factory = BuildFactory()
factory.addStep(SVN( factory.addStep(SVN(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, username='buildbot@tools.ietf.org',
repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'))) descriptionDone="svn update",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'),
descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')],
))
factory.addStep(RemovePYCs(workdir=Interpolate('build/%(src::branch)s')))
factory.addStep(ShellCommand( factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, descriptionDone="install requirements",
command=["pip", "install", "-r", "requirements.txt"])) workdir=Interpolate('build/%(src::branch)s'),
factory.addStep(ShellCommand( haltOnFailure=True,
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True, command=["pip", "install", "-r", "requirements.txt"],
command=["bin/test-crawl", "--settings=ietf.settings_testcrawl"])) ))
factory.addStep(Test(
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["ietf/manage.py", "test", "--settings=settings_sqlitetest"],
))
# This should be the last action # This should be the last action
factory.addStep(ShellCommand(descriptionDone="mark as passed", factory.addStep(ShellCommand(
descriptionDone="mark as passed",
workdir=Interpolate('build/%(src::branch)s'), workdir=Interpolate('build/%(src::branch)s'),
command=["svn", "--username=buildbot@tools.ietf.org", "--password=ax+u#ikxabx7", command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"--no-auth-cache", "--non-interactive", "propset", "--revprop", "-r", Property('got_revision'), "test:unittest", "passed" ],
"propset", "--revprop", "-r", Property('got_revision'), "test:crawler", "passed" ])) ))
c['builders'].append(BuilderConfig(name="run_crawler", factory=factory, c['builders'].append(BuilderConfig(name="Test Suite (OS X)", factory=factory,
slavenames=["datatracker_py27_1"])) slavenames=["datatracker_osx_py27_4"]))
# --- Run test-crawler ---
factory = BuildFactory()
factory.addStep(SVN(
username='buildbot@tools.ietf.org',
descriptionDone="svn update",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s'),
descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')],
))
factory.addStep(RemovePYCs(workdir=Interpolate('build/%(src::branch)s')))
factory.addStep(ShellCommand(
descriptionDone="install requirements",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"],
))
factory.addStep(TestCrawlerShellCommand(
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["bin/test-crawl", "--settings=ietf.settings_testcrawl"],
))
# This should be the last action
factory.addStep(ShellCommand(
descriptionDone="mark as passed",
workdir=Interpolate('build/%(src::branch)s'),
command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:crawler", "passed" ],
))
c['builders'].append(BuilderConfig(name="Test-Crawler", factory=factory,
slavenames=["datatracker_lin_py27_1", ]))
####### STATUS TARGETS ####### STATUS TARGETS
@ -157,14 +238,14 @@ from buildbot.status.web import authz, auth
authz_cfg=authz.Authz( authz_cfg=authz.Authz(
# change any of these to True to enable; see the manual for more # change any of these to True to enable; see the manual for more
# options # options
auth.BasicAuth([("ietfdb","ietfdb")]), auth=auth.BasicAuth([("ietfdb","ietfdb")]),
gracefulShutdown = False, gracefulShutdown = False,
forceBuild = 'auth', # use this to test your slave once it is set up forceBuild = 'auth', # use this to test your slave once it is set up
forceAllBuilds = False, forceAllBuilds = False,
pingBuilder = False, pingBuilder = False,
stopBuild = False, stopBuild = 'auth',
stopAllBuilds = False, stopAllBuilds = False,
cancelPendingBuild = False, cancelPendingBuild = 'auth',
) )
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))