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 -*-
# 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
# a shorter alias to save typing.
@ -15,9 +14,10 @@ c = BuildmasterConfig = {}
# slave name and password must be configured on the slave.
from buildbot.buildslave import BuildSlave
c['slaves'] = [
BuildSlave("datatracker_py27_1", "yWQaUzdJk8oL"),
BuildSlave("datatracker_py27_2", "nm+=+knVGycN"),
BuildSlave("datatracker_py27_3", "WZgYahJ4twXR"),
BuildSlave("datatracker_lin_py27_1", datatracker_lin_py27_1_pw),
BuildSlave("datatracker_lin_py27_2", datatracker_lin_py27_2_pw),
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
@ -41,7 +41,7 @@ from buildbot.changes.pb import PBChangeSource
# prefix = userinfo[user]["prefix"]
# c.['change_source'].append(PBChangeSource(user=user, passwd="BRiR6XcT7x3$", prefix=prefix))
c['change_source'] = [
PBChangeSource(user="ietfdb", passwd="BRiR6XcT7x3$"),
PBChangeSource(user="ietfdb", passwd=ietfdb_svn_hook_pw),
]
####### SCHEDULERS
@ -53,9 +53,10 @@ from buildbot.schedulers.basic import SingleBranchScheduler, AnyBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.changes import filter
c['schedulers'] = [
AnyBranchScheduler(name="pyflakes", treeStableTimer=10, builderNames=["run_pyflakes"]),
AnyBranchScheduler(name="test", treeStableTimer=60*10, builderNames=["run_tests"]),
SingleBranchScheduler(name="crawler", treeStableTimer=60*60*4, builderNames=["run_crawler"],
AnyBranchScheduler(name="pyflakes", treeStableTimer=10, builderNames=["Check PyFlakes"]),
AnyBranchScheduler(name="lin_test", treeStableTimer=60*5, builderNames=["Test Suite"]),
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')),
]
@ -67,80 +68,160 @@ c['schedulers'] = [
from buildbot.process.factory import BuildFactory
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_twisted import RemovePYCs
#
from buildbot.process.properties import Property, Interpolate
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'] = []
# Run pyflakes
# --- Run pyflakes ---
factory = BuildFactory()
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'),
descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')],
))
factory.addStep(RemovePYCs(workdir=Interpolate('build/%(src::branch)s')))
factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"]))
descriptionDone="install requirements",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"],
))
factory.addStep(PyFlakes(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
command=["ietf/manage.py", "pyflakes", "--verbosity=0"]))
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["ietf/manage.py", "pyflakes", "--verbosity=0"],
))
# 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'),
command=["svn", "--username=buildbot@tools.ietf.org", "--password=ax+u#ikxabx7",
"--no-auth-cache", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:pyflakes", "passed" ]))
command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:pyflakes", "passed" ],
))
c['builders'].append(BuilderConfig(name="run_pyflakes", factory=factory,
slavenames=["datatracker_py27_1", "datatracker_py27_2", "datatracker_py27_3"]))
c['builders'].append(BuilderConfig(name="Check PyFlakes", factory=factory,
slavenames=["datatracker_lin_py27_1", "datatracker_lin_py27_2", "datatracker_lin_py27_3"]))
# Run tests
# --- Run tests ---
factory = BuildFactory()
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'),
descriptionSuffix=[Interpolate('%(src::branch)s %(src::revision)s')],
))
factory.addStep(RemovePYCs(workdir=Interpolate('build/%(src::branch)s')))
factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"]))
factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
command=["ietf/manage.py", "test", "--settings=settings_sqlitetest"]))
descriptionDone="install requirements",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"],
))
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
factory.addStep(ShellCommand(descriptionDone="mark as passed",
factory.addStep(ShellCommand(
descriptionDone="mark as passed",
workdir=Interpolate('build/%(src::branch)s'),
command=["svn", "--username=buildbot@tools.ietf.org", "--password=ax+u#ikxabx7",
"--no-auth-cache", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:unittest", "passed" ]))
command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:unittest", "passed" ],
))
c['builders'].append(BuilderConfig(name="run_tests", factory=factory,
slavenames=["datatracker_py27_1", "datatracker_py27_2", "datatracker_py27_3"]))
c['builders'].append(BuilderConfig(name="Test Suite", factory=factory,
slavenames=["datatracker_lin_py27_1", "datatracker_lin_py27_2", "datatracker_lin_py27_3"]))
# Run test-crawler
# --- Run tests on os-x ---
factory = BuildFactory()
factory.addStep(SVN(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
repourl=Interpolate('https://svn.tools.ietf.org/svn/tools/ietfdb/%(src::branch:~trunk)s')))
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(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"]))
factory.addStep(ShellCommand(
workdir=Interpolate('build/%(src::branch)s'), haltOnFailure=True,
command=["bin/test-crawl", "--settings=ietf.settings_testcrawl"]))
descriptionDone="install requirements",
workdir=Interpolate('build/%(src::branch)s'),
haltOnFailure=True,
command=["pip", "install", "-r", "requirements.txt"],
))
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
factory.addStep(ShellCommand(descriptionDone="mark as passed",
factory.addStep(ShellCommand(
descriptionDone="mark as passed",
workdir=Interpolate('build/%(src::branch)s'),
command=["svn", "--username=buildbot@tools.ietf.org", "--password=ax+u#ikxabx7",
"--no-auth-cache", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:crawler", "passed" ]))
command=["svn", "--username=buildbot@tools.ietf.org", "--non-interactive",
"propset", "--revprop", "-r", Property('got_revision'), "test:unittest", "passed" ],
))
c['builders'].append(BuilderConfig(name="run_crawler", factory=factory,
slavenames=["datatracker_py27_1"]))
c['builders'].append(BuilderConfig(name="Test Suite (OS X)", factory=factory,
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
@ -157,14 +238,14 @@ from buildbot.status.web import authz, auth
authz_cfg=authz.Authz(
# change any of these to True to enable; see the manual for more
# options
auth.BasicAuth([("ietfdb","ietfdb")]),
auth=auth.BasicAuth([("ietfdb","ietfdb")]),
gracefulShutdown = False,
forceBuild = 'auth', # use this to test your slave once it is set up
forceAllBuilds = False,
pingBuilder = False,
stopBuild = False,
stopBuild = 'auth',
stopAllBuilds = False,
cancelPendingBuild = False,
cancelPendingBuild = 'auth',
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))