mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-05-21 05:40:49 +00:00
ab56105b6b
This allows to more easily detect breakage signs.
107 lines
2.4 KiB
INI
107 lines
2.4 KiB
INI
# -*- python -*-
|
|
# vim: set ft=python tabstop=8 expandtab shiftwidth=4 softtabstop=4:
|
|
# ex: set syntax=python:
|
|
|
|
#######
|
|
####### ScummVM settings for buildbot
|
|
#######
|
|
|
|
import os, sys
|
|
import importlib
|
|
|
|
module_path = os.path.dirname(__file__)
|
|
sys.path.insert(0, module_path)
|
|
|
|
# Make DeperecationWarnings visible in our code
|
|
import warnings
|
|
warnings.filterwarnings('default', category=DeprecationWarning, module=r'(config|workers|builds|platforms|ui|utils\..*)')
|
|
|
|
def refresh(directory):
|
|
for module in list(sys.modules.values()):
|
|
try:
|
|
f = module.__file__
|
|
except AttributeError:
|
|
# Some modules don't have __file__ attribute
|
|
continue
|
|
if f is None:
|
|
continue
|
|
try:
|
|
if os.path.commonpath([f, directory]) != directory:
|
|
continue
|
|
except ValueError:
|
|
continue
|
|
print("Reloading {0}".format(module.__name__))
|
|
importlib.reload(module)
|
|
|
|
# Refresh modules inside buildbot-config to be able to refresh configuration on reload
|
|
# Do it before importing else we will load modules twice at startup
|
|
refresh(module_path)
|
|
|
|
import config
|
|
import workers, builds, platforms, ui
|
|
|
|
#######
|
|
####### buildbot setup
|
|
#######
|
|
|
|
c = BuildmasterConfig = {}
|
|
|
|
####### STORAGE
|
|
|
|
c["db"] = config.db
|
|
|
|
####### WORKERS
|
|
|
|
## The workers buildbots.
|
|
|
|
c["workers"] = workers.workers
|
|
|
|
c['protocols'] = {
|
|
'pb': {
|
|
'port': 'tcp:{0}:interface={1}'.format(config.pb_protocol_port, workers.buildbot_ip)
|
|
}
|
|
}
|
|
|
|
####### CHANGE SOURCES
|
|
|
|
c["change_source"] = [
|
|
build.getChangeSource(config.builds_to_poll[build.name]) for build in builds.builds
|
|
if build.name in config.builds_to_poll ]
|
|
|
|
####### SCHEDULERS
|
|
|
|
c["schedulers"] = list()
|
|
for build in builds.builds:
|
|
c["schedulers"].extend(build.getSchedulers(platforms.platforms))
|
|
|
|
####### BUILDERS
|
|
|
|
c["builders"] = list()
|
|
for build in builds.builds:
|
|
c["builders"].extend(build.getBuilders(platforms.platforms))
|
|
|
|
####### PROJECTS
|
|
c["projects"] = [build.getProject() for build in builds.builds]
|
|
|
|
####### CONFIGURATORS
|
|
|
|
# For now only a janitor
|
|
c['configurators'] = [ui.janitor]
|
|
|
|
####### STATUS TARGETS
|
|
|
|
c['www'] = ui.www
|
|
c['services'] = ui.services
|
|
|
|
####### PROJECT IDENTITY
|
|
|
|
c["title"] = config.title
|
|
c["titleURL"] = config.title_url
|
|
c["buildbotURL"] = config.buildbot_url
|
|
|
|
# Don't report usage data to buildbot project
|
|
c['buildbotNetUsageData'] = None
|
|
|
|
# Limit changes to improve performance
|
|
c['changeHorizon'] = config.change_horizon
|