Update master.cfg for new BuildBot 2.4.1 server

This commit is contained in:
Robin Dunn
2019-09-17 18:00:58 -07:00
parent 4a506f82a6
commit 6cf07611d7
3 changed files with 316 additions and 473 deletions

View File

@@ -2,7 +2,7 @@ Buildbot Master Config
----------------------
The master.cfg file in this folder is the configuration file for Project
Phoenix's buildbot, running at http://buildbot.wxpython.org:8010/ This file
Phoenix's buildbot, running at http://buildbot.wxpython.org:8011/ This file
is the master copy and is kept here in order to keep it under revision
control. It is *NOT* automatically copied to the build master when it is
updated and committed and must be copied manually. This is to help avoid
@@ -13,6 +13,6 @@ Buildbot.
Developers with the proper SSH keys can copy the file and reconfigure the
server with these commands:
scp buildbot/master.cfg wxpybb@buildbot.wxpython.org:/home/wxpybb/buildbot
ssh wxpybb@buildbot.wxpython.org "cd /home/wxpybb && ./reconfig"
scp buildbot/master.cfg wxpybb@buildbot.wxpython.org:/home/wxpybb/bb2
ssh wxpybb@buildbot.wxpython.org "cd /home/wxpybb/bb2 && ./reconfig"

View File

@@ -1,530 +1,372 @@
# -*- python -*-
# ex: set syntax=python:
#-------------------------------------------------------------------------------
# This is the buildmaster config file for the wxPython Phoenix Buildbot,
# located at http://buildbot.wxpython.org:8010/. This file is located here in
# order to allow it to be versioned and backed up. However it is NOT
# automatically copied into the buildmaster's working folder, that must be
# done by hand after reviewing changes made here. It must be installed as
# 'master.cfg' in the buildmaster's base directory.
#-------------------------------------------------------------------------------
# ex: set filetype=python:
from buildbot.plugins 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.
c = BuildmasterConfig = {}
c['buildbotNetUsageData'] = None
# Put some of our custom config items here, to make it easier to use below
WORKER_PORT = 9988
MASTER_WWW_HOST = 'http://buildbot.wxpython.org'
MASTER_WWW_PORT = 8011
TITLE = 'wxPython4 CI'
TITLE_URL = 'https://wxPython.org'
####### BUILDSLAVES
GIT_URL = 'https://github.com/wxWidgets/Phoenix.git'
GIT_BRANCH = 'master'
# The 'slaves' list defines the set of recognized buildslaves. Each element
# is a BuildSlave object, specifying a unique slave name and password. The
# same slave name and password must be configured on the slave.
# Passwords are stored separately and not maintained in the source repository
# for security's sake
import bbpasswd
reload(bbpasswd)
#reload(bbpasswd)
from buildbot.buildslave import BuildSlave
c['slaves'] = [#BuildSlave("osx-10.7-vm-py2.7", bbpasswd.PASSWD1,
# notify_on_missing='robin@alldunn.com',
# max_builds=1),
##---------------------------------------------------------------------------
####### WORKERS
#BuildSlave("macosx-vm4", bbpasswd.PASSWD1,
# notify_on_missing='robin@alldunn.com',
# max_builds=1),
# The 'workers' list defines the set of recognized workers. Each element is
# a Worker object, specifying a unique worker name and password. The same
# worker name and password must be configured on the worker.
c['workers'] = [
worker.Worker('macosx-1', bbpasswd.PASSWD1, max_builds=1),
worker.Worker('windows-1', bbpasswd.PASSWD1, max_builds=1),
worker.Worker('linux-1', bbpasswd.PASSWD1, max_builds=1),
]
BuildSlave("macosx-vm6", bbpasswd.PASSWD1,
notify_on_missing='robin@alldunn.com',
max_builds=1),
BuildSlave("win7-py27", bbpasswd.PASSWD1,
notify_on_missing='robin@alldunn.com',
max_builds=1),
##---------------------------------------------------------------------------
####### PROTOCOLS
BuildSlave("ubuntu-x64_86-py27", bbpasswd.PASSWD1,
notify_on_missing='robin@alldunn.com',
max_builds=1),
#BuildSlave("osx_10.6-py27", bbpasswd.PASSWD1,
# notify_on_missing='robin@alldunn.com',
# max_builds=1),
#BuildSlave('vagrant-bldr', bbpasswd.PASSWD1,
# notify_on_missing='robin@alldunn.com',
# max_builds=1),
]
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
# This must match the value configured into the buildslaves (with their
# 'protocols' contains information about protocols which master will use for
# communicating with workers. You must define at least 'port' option that workers
# could connect to your master with this protocol.
# 'port' must match the value configured into the workers (with their
# --master option)
c['slavePortnum'] = 9989
c['protocols'] = {'pb': {'port': WORKER_PORT}}
##---------------------------------------------------------------------------
####### CHANGESOURCES
# The 'change_source' setting tells the buildmaster how it should find out
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes.
## c['change_source'] =
# NOTE: Instead of using the usual GitPoller here, the BB web server has been
# configured to recieve webhooks from GitHub. See below for the 'www'
# configuration settings.
# See WebStatus setup below for alternate approach using GitHub's webhooks,
# where github will send us info about changes as they are pushed or merged,
# instead of having buildbot poll the repos itself.
# c['change_source'] = []
# c['change_source'].append(changes.GitPoller(GIT_URL, branch=GIT_BRANCH,
# workdir='gitpoller-workdir',
# pollInterval=300))
phoenixGitUrl = 'https://github.com/wxWidgets/Phoenix.git'
phoenixGitBranch = 'master'
##---------------------------------------------------------------------------
####### BUILD FACTORIES and their STEPS
def makeBuildFactory(wxport, py_ver, build_type='basic'):
"""
Constructs a build factory for the given wxport and Python version.
"""
factory = util.BuildFactory()
# extra config options for git commands
gitConfig = {'core.autocrlf' : 'input'}
mode = 'incremental'
method = 'clobber'
if wxport not in ['win32', 'win64']:
PYTHON = f'../../venv-{py_ver}/bin/python'
else:
PYTHON = f'..\\..\\venv-{py_ver}\\Scripts\\python.exe'
environ = dict(PYTHONPATH='.', PYTHONUNBUFFERED='1')
# check out the source
factory.addStep(steps.Git(name='fetch from git',
repourl=GIT_URL, branch=GIT_BRANCH,
config=gitConfig,
progress=True,
clobberOnFailure=True,
submodules=True,
logEnviron=False,
timeout=2400,
mode=mode,
method=method
))
cmd = [PYTHON, '-m', 'pip', 'install', '-r', 'requirements.txt']
factory.addStep(
steps.ShellCommand(name='install python packages', command=cmd, env=environ))
common_opts = []
if wxport == 'gtk2':
common_opts.append('--gtk2')
if wxport == 'gtk3':
common_opts.append('--gtk3')
if wxport in ['win32', 'win64']:
common_opts.append('--cairo')
if wxport == 'win64':
common_opts.append('--x64')
if build_type == 'dist':
common_opts.append('--relwithdebug')
if build_type != 'docs':
common_opts.append('--nodoc')
common_opts.append(util.Interpolate('%(prop:do-release-build:#?|--release|)s'))
common_opts.append(util.Property('extra-build-arg', default=''))
cmd = [PYTHON, 'build.py', 'clean_all', 'setrev'] + common_opts
factory.addStep(
steps.ShellCommand(name='clean workspace', command=cmd, env=environ))
cmd = [PYTHON, 'build.py', 'build_wx'] + common_opts
factory.addStep(
steps.ShellCommand(name='build wxWidgets', command=cmd, env=environ))
cmd = [PYTHON, 'build.py', 'dox', 'etg', 'sip'] + common_opts
factory.addStep(
steps.ShellCommand(name='generate code', command=cmd, env=environ))
cmd = [PYTHON, 'build.py', 'build_py'] + common_opts
factory.addStep(
steps.ShellCommand(name='build wxPython', command=cmd, env=environ))
if build_type == 'dist':
cmd = [PYTHON, 'build.py', 'bdist_wheel', '--upload'] + common_opts
factory.addStep(
steps.ShellCommand(name='build wxPython wheel and upload', command=cmd, env=environ))
if build_type == 'docs':
cmd = [PYTHON, 'build.py', 'wxlib', 'sphinx', 'bdist_docs', '--upload'] + common_opts
factory.addStep(
steps.ShellCommand(name='build wxPython documentation and upload', command=cmd, env=environ))
if build_type == 'sdist':
cmd = [PYTHON, 'build.py', 'wxlib', 'sdist', 'sdist_demo', '--upload'] + common_opts
factory.addStep(
steps.ShellCommand(name='build wxPython source archive and upload', command=cmd, env=environ))
return factory
def makeTriggerFactory():
"""
This factory uses a Trigger step to start all the dist-* builders.
"""
factory = util.BuildFactory()
factory.addStep(
steps.Trigger(schedulerNames=['triggerable-dist'],
set_properties={'do-release-build': util.Property('do-release-build'),
'extra-build-arg': util.Property('extra-build-arg')}
))
return factory
##---------------------------------------------------------------------------
####### BUILDERS
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which workers can execute them. Note that any particular build will
# only take place on one worker.
# Organize the builder names into these lists to make it easier to specify them
# for the schedulers below, as well as for creating the BuilderConfig objects.
regularBuilders = [ 'build-osx-py27',
'build-osx-py35',
'build-osx-py36',
'build-osx-py37',
'build-gtk2-py27',
'build-gtk2-py36',
'build-gtk2-py37',
'build-gtk3-py27',
'build-gtk3-py36',
'build-gtk3-py37',
'build-win32-py27',
'build-win32-py35',
'build-win32-py36',
'build-win32-py37',
'build-win64-py27',
'build-win64-py35',
'build-win64-py36',
'build-win64-py37',
]
distBuilders = [ 'dist-osx-py27',
'dist-osx-py35',
'dist-osx-py36',
'dist-osx-py37',
'dist-win32-py35',
'dist-win32-py36',
'dist-win32-py37',
'dist-win64-py27',
'dist-win64-py35',
'dist-win64-py36',
'dist-win64-py37',
]
otherBuilders = [ 'dist-docs-py37',
'dist-src-py37',
]
triggerBuilders = [ 'trigger-all-dist',]
def makeBuilderConfigs(builder_names):
def _portToWorker(port):
pwmap = { 'osx': ['macosx-1'],
'gtk2': ['linux-1'],
'gtk3': ['linux-1'],
'win32': ['windows-1'],
'win64': ['windows-1'],
'src': ['linux-1'],
'docs': ['windows-1'], }
return pwmap[port]
BCs = []
for bname in builder_names:
btype, port, py = bname.split('-')
py = '{}.{}'.format(py[2], py[3])
if port == 'docs':
BCs.append(util.BuilderConfig(
name=bname,
workernames=_portToWorker(port),
factory=makeBuildFactory('win64', py, 'docs')))
continue
if port == 'src':
BCs.append(util.BuilderConfig(
name=bname,
workernames=_portToWorker(port),
factory=makeBuildFactory('gtk3', py, 'sdist')))
continue
if btype == 'build':
BCs.append(util.BuilderConfig(
name=bname,
workernames=_portToWorker(port),
factory=makeBuildFactory(port, py)))
continue
if btype == 'dist':
BCs.append(util.BuilderConfig(
name=bname,
workernames=_portToWorker(port),
factory=makeBuildFactory(port, py, 'dist')))
continue
assert False, "should not get here..."
return BCs
c['builders'] = makeBuilderConfigs(regularBuilders + distBuilders + otherBuilders)
c['builders'].append(util.BuilderConfig(name='trigger-all-dist',
workernames=['linux-1'],
factory=makeTriggerFactory()))
##---------------------------------------------------------------------------
####### SCHEDULERS
# Configure the Schedulers, which decide how to react to incoming changes.
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.timed import Nightly
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.changes.filter import ChangeFilter
c['schedulers'] = [ schedulers.SingleBranchScheduler(
name="per-commit-builds",
change_filter=util.ChangeFilter(branch=GIT_BRANCH),
treeStableTimer=60,
builderNames=regularBuilders),
c['schedulers'] = []
c['schedulers'].append( SingleBranchScheduler(
name="sched-build",
change_filter=ChangeFilter(branch=phoenixGitBranch),
treeStableTimer=30,
builderNames=["build-win32-py27",
"build-win32-py35",
"build-win32-py36",
"build-win32-py37",
"build-win64-py27",
"build-win64-py35",
"build-win64-py36",
"build-win64-py37",
"build-osx-py27",
"build-osx-py35",
"build-osx-py36",
"build-osx-py37",
"build-gtk-py27",
"build-gtk-py36",
"build-gtk-py37",
"build-gtk3-py27",
"build-gtk3-py36",
"build-gtk3-py37",
]))
c['schedulers'].append( Nightly(
name="sched-dist",
branch=phoenixGitBranch,
hour=1, minute=15,
onlyIfChanged=True,
builderNames=["dist-osx-py27",
"dist-osx-py35",
"dist-osx-py36",
"dist-osx-py37",
"dist-win32-py27",
"dist-win32-py35",
"dist-win32-py36",
"dist-win32-py37",
"dist-win64-py27",
"dist-win64-py35",
"dist-win64-py36",
"dist-win64-py37",
]))
c['schedulers'].append( Nightly(
name="sched-docs",
branch=phoenixGitBranch,
schedulers.Nightly(
name='nightly-others',
branch=GIT_BRANCH,
hour=1, minute=10,
onlyIfChanged=True,
builderNames=["dist-docs"]))
builderNames=otherBuilders),
c['schedulers'].append( Nightly(
name="sched-src",
branch=phoenixGitBranch,
hour=1, minute=10,
schedulers.Nightly(
name='nightly-dist',
branch=GIT_BRANCH,
hour=1, minute=20,
onlyIfChanged=True,
builderNames=["dist-src"]))
builderNames=distBuilders),
# c['schedulers'].append( Nightly(
# name="sched-vagrant",
# branch=phoenixGitBranch,
# hour=1, minute=10,
# onlyIfChanged=True,
# builderNames=["vagrant-bldr"]))
schedulers.ForceScheduler(
name="force-build",
builderNames=regularBuilders + distBuilders + otherBuilders + triggerBuilders,
properties=[
util.BooleanParameter(name='do-release-build', label='Do a release build?', default=False),
util.StringParameter(name='extra-build-arg', label='Extra build.py arg', default=''),
]),
c['schedulers'].append( ForceScheduler(
name='sched-force',
builderNames=["build-win32-py27",
"build-win32-py35",
"build-win32-py36",
"build-win32-py37",
"build-win64-py27",
"build-win64-py35",
"build-win64-py36",
"build-win64-py37",
"build-osx-py27",
"build-osx-py35",
"build-osx-py36",
"build-osx-py37",
"build-gtk-py27",
"build-gtk-py36",
"build-gtk-py37",
"build-gtk3-py27",
"build-gtk3-py36",
"build-gtk3-py37",
"dist-osx-py27",
"dist-osx-py35",
"dist-osx-py36",
"dist-osx-py37",
"dist-win32-py27",
"dist-win32-py35",
"dist-win32-py36",
"dist-win32-py37",
"dist-win64-py27",
"dist-win64-py35",
"dist-win64-py36",
"dist-win64-py37",
"dist-docs",
"dist-src",
#"vagrant-bldr",
]))
schedulers.Triggerable(
name='triggerable-dist',
builderNames=distBuilders + otherBuilders,
),
]
####### BUILDERS
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which slaves can execute them. Note that any particular build will
# only take place on one slave.
##---------------------------------------------------------------------------
####### BUILDBOT SERVICES
# NOTE on build properties. The following properties are defined in the
# factories generated in this function that can be used to customize the
# builds:
#
# fullclean: Set to 'yes' to fully clean the "build-*" builders before
# checking out the code. Normally they will try to do an incremental
# build to save time, but sometimes things change enough that
# incrementals won't work.
#
# buildargs: Adds additional flags or commands to the build.py command
# line. For example, adding '--releases' will (in theory) switch
# the "dist-*" builders from making snapshot builds to making release
# builds.
# 'services' is a list of BuildbotService items like reporter targets. The
# status of each build will be pushed to these targets. buildbot/reporters/*.py
# has a variety to choose from, like IRC bots.
from buildbot.process.factory import BuildFactory
from buildbot.process.properties import Property, WithProperties
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
from buildbot.config import BuilderConfig
c['services'] = []
def makeFactory(port, buildType='buildOnly', pyVer='2.7'):
factory = BuildFactory()
if False:
# Was the build started from the force build form with a "fullclean"
# property set? If so, fully clobber the git workspace and start fresh.
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then rm -rf ../Phoenix; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir=""))
# By default do an incremental update, keeping prior build tree
mode = 'incremental'
method = None
clean = ''
# Start from a clean build tree for the daily "dist" builds
if buildType in ['dist', 'sdist', 'docs', 'vagrant']:
mode = 'full'
method = 'clobber'
else:
# Always do a clean build.
mode = 'full'
method = 'clobber'
clean = ''
# extra config options for git commands
gitConfig = {'core.autocrlf' : 'input'}
# all of them need to fetch the source
factory.addStep(Git(name='phoenix-git', repourl=phoenixGitUrl, branch=phoenixGitBranch,
workdir="Phoenix",
config=gitConfig,
progress=True,
clobberOnFailure=True,
submodules=True,
logEnviron=False,
timeout=2400,
mode=mode, method=method))
if buildType == 'sdist':
cmd = 'python -u build.py %s setrev setpythonpath dox touch etg sip build '\
'wxlib sdist sdist_demo --upload' % pyVer
elif buildType == 'docs':
cmd = 'python -u build.py %s setrev setpythonpath dox touch etg sip build wxlib ' \
'sphinx bdist_docs --upload' % pyVer
elif buildType == 'vagrant':
# TODO: This will also upload the source tarfile, which is redundant
# since there is another job for that. Is there an easy way around
# that?
cmd = 'python -u build.py setrev dox etg --nodoc sip sdist ' \
'build_vagrant --upload'
else:
cmd = 'python -u build.py %s %s setrev dox touch etg --nodoc sip build' % (pyVer, clean)
if port == 'osx':
if buildType == 'buildOnly':
# Only build one arch for the normal builds, so dependency
# tracking will be turned on so we can have faster turn-around
# times for those builds.
cmd += ' --mac_arch=i386'
else:
# Build both architectures for the distribution builders
cmd += ' --mac_arch=i386,x86_64'
if port == 'gtk2':
cmd += ' --gtk2'
if port == 'gtk3':
cmd += ' --gtk3'
if port in ['win32', 'win64']:
cmd += ' --cairo'
if port == 'win64':
cmd += ' --x64'
if buildType == 'dist':
cmd += ' bdist_wheel --upload --relwithdebug'
cmd = cmd.split() + [Property('buildargs', default='')]
factory.addStep(ShellCommand(command=cmd, workdir="Phoenix",
description="building", descriptionDone="build"))
return factory
c['builders'] = [
BuilderConfig(name="build-osx-py27",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='2.7')),
BuilderConfig(name="build-osx-py35",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='3.5')),
BuilderConfig(name="build-osx-py36",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='3.6')),
BuilderConfig(name="build-osx-py37",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='3.7')),
BuilderConfig(name="build-win32-py27",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='2.7')),
BuilderConfig(name="build-win32-py35",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='3.5')),
BuilderConfig(name="build-win32-py36",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='3.6')),
BuilderConfig(name="build-win32-py37",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='3.7')),
BuilderConfig(name="build-win64-py27",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='2.7')),
BuilderConfig(name="build-win64-py35",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='3.5')),
BuilderConfig(name="build-win64-py36",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='3.6')),
BuilderConfig(name="build-win64-py37",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='3.7')),
BuilderConfig(name="build-gtk-py27",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk2', pyVer='2.7')),
BuilderConfig(name="build-gtk-py36",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk2', pyVer='3.6')),
BuilderConfig(name="build-gtk-py37",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk2', pyVer='3.7')),
BuilderConfig(name="build-gtk3-py27",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk3', pyVer='2.7')),
BuilderConfig(name="build-gtk3-py36",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk3', pyVer='3.6')),
BuilderConfig(name="build-gtk3-py37",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk3', pyVer='3.7')),
BuilderConfig(name="dist-docs",
slavenames=["win7-py27"],
factory=makeFactory('', 'docs', pyVer='2.7')),
BuilderConfig(name="dist-src",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('', 'sdist', pyVer='2.7')),
BuilderConfig(name="dist-osx-py27",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist')),
BuilderConfig(name="dist-osx-py35",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.5')),
BuilderConfig(name="dist-osx-py36",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.6')),
BuilderConfig(name="dist-osx-py37",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.7')),
BuilderConfig(name="dist-win32-py27",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='2.7')),
BuilderConfig(name="dist-win32-py35",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.5')),
BuilderConfig(name="dist-win32-py36",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.6')),
BuilderConfig(name="dist-win32-py37",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.7')),
BuilderConfig(name="dist-win64-py27",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='2.7')),
BuilderConfig(name="dist-win64-py35",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.5')),
BuilderConfig(name="dist-win64-py36",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.6')),
BuilderConfig(name="dist-win64-py37",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.7')),
# BuilderConfig(name="vagrant-bldr",
# slavenames=["vagrant-bldr"],
# factory=makeFactory('osx', 'vagrant')),
]
####### STATUS TARGETS
# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.
c['status'] = []
# Define authentication and turn on some protected options
from buildbot.status import html
from buildbot.status.web import authz
from buildbot.status.web.auth import BasicAuth
authz_cfg = authz.Authz(
auth = BasicAuth(bbpasswd.USERS),
forceBuild = 'auth',
forceAllBuilds = 'auth',
gracefulShutdown = True,
#pingBuilder = True,
stopBuild = True,
stopAllBuilds = True,
cancelPendingBuild = True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg,
change_hook_dialects={
'base': True,
'github': True},
change_hook_auth=["file:changehook.passwd"],
order_console_by_time=True,
))
# email notification
from buildbot.status.mail import MailNotifier
mn = MailNotifier(fromaddr="buildbot@riobu.com",
sendToInterestedUsers=False,
mode='problem',
extraRecipients=['robin@alldunn.com'])
c['status'].append(mn)
##---------------------------------------------------------------------------
####### PROJECT IDENTITY
# the 'title' string will appear at the top of this buildbot
# installation's html.WebStatus home page (linked to the
# 'titleURL') and is embedded in the title of the waterfall HTML page.
# the 'title' string will appear at the top of this buildbot installation's
# home pages (linked to the 'titleURL').
c['title'] = "wxPython Phoenix"
c['titleURL'] = "http://wxpython.org"
c['title'] = TITLE
c['titleURL'] = TITLE_URL
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.WebStatus page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
# internal web server is visible. This typically uses the port number set in
# the 'www' entry below, but with an externally-visible host name which the
# buildbot cannot figure out without some help.
c['buildbotURL'] = "http://buildbot.wxpython.org:8010/"
c['buildbotURL'] = f"{MASTER_WWW_HOST}:{MASTER_WWW_PORT}/"
# Set up the web UI
from twisted.cred import strcred
c['www'] = dict(port=MASTER_WWW_PORT,
plugins=dict(waterfall_view={}, console_view={}, grid_view={}),
# Add GitHub webhook support for push notifications
change_hook_dialects=dict(github={'secret': 'TheQuickBrownFoxAintSoQuick'}),
change_hook_auth=[strcred.makeChecker("file:changehook.passwd")],
)
# TODO: Fix the security/auth stuff!!
# Add security so only admins can start builds, etc.
# c['www']['authz'] = util.Authz(
# allowRules = [
# util.AnyEndpointMatcher(role="admins", defaultDeny=False)
# ],
# roleMatchers = [
# util.RolesFromUsername(roles=['admins'], usernames=['robin'])
# ]
# )
# c['www']['auth'] = util.UserPasswordAuth(bbpasswd.ADMIN_USERS)
##---------------------------------------------------------------------------
####### DB URL
# This specifies what database buildbot uses to store change and scheduler
# state. You can leave this at its default for all but the largest
# installations.
c['db_url'] = "sqlite:///state.sqlite"
c['changeHorizon'] = 200
c['buildHorizon'] = 100
c['eventHorizon'] = 50
c['logHorizon'] = 40
c['buildCacheSize'] = 15
c['db'] = {
# This specifies what database buildbot uses to store its state.
# It's easy to start with sqlite, but it's recommended to switch to a dedicated
# database, such as PostgreSQL or MySQL, for use in production environments.
# http://docs.buildbot.net/current/manual/configuration/global.html#database-specification
'db_url' : "sqlite:///state.sqlite",
}

View File

@@ -6,6 +6,7 @@ wheel
twine
sphinx
requests
requests[security]
cython
pytest
pytest-xdist