-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmaster.cfg
106 lines (76 loc) · 2.43 KB
/
master.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# -*- 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