-
Notifications
You must be signed in to change notification settings - Fork 0
/
master.cfg
256 lines (198 loc) · 10.2 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# -*- python3 -*-
# ex: set syntax=python3:
import bot_config
from buildbot.plugins import *
from utils.matrix_reporter import MatrixReporter
from utils.github_handler import CustomGitHubEventHandler
from utils.user_auth import UserAuth
from qtpyvcp.qtpyvcp_factory import factory_qtpyvcp
from qtpyvcp.qtpyvcp_dev_factory import factory_qtpyvcp_dev
from qtpyvcp.qtpyvcp_pi4_factory import factory_qtpyvcp_pi4
from qtpyvcp.qtpyvcp_pi4_dev_factory import factory_qtpyvcp_pi4_dev
from probe_basic.probe_basic_factory import factory_probe_basic
from probe_basic.probe_basic_pi4_factory import factory_probe_basic_pi4
from probe_basic.probe_basic_dev_factory import factory_probe_basic_dev
from probe_basic.probe_basic_pi4_dev_factory import factory_probe_basic_pi4_dev
from tnc.tnc_factory import factory_tnc
from tnc.tnc_pi4_factory import factory_tnc_pi4
from tnc.tnc_dev_factory import factory_tnc_dev
from tnc.tnc_pi4_dev_factory import factory_tnc_pi4_dev
from monokrom.monokrom_dev_factory import factory_monokrom_dev
from monokrom.monokrom_pi4_dev_factory import factory_monokrom_pi4_dev
# from linuxcnc_factory import factory_linuxcnc
# 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 = {}
# WORKERS
# 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("kcjengr-worker", bot_config.worker),
worker.Worker("kcjengr-arm64-worker", bot_config.worker)
]
# '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['protocols'] = {'pb': {'port': 9989}}
# CHANGESOURCES
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes. Here we point to the buildbot version of a python hello-world project.
c['change_source'] = []
# c['change_source'].append(changes.GitPoller(
# 'https://github.com/kcjengr/qtpyvcp.git',
# workdir='gitpoller-workdir', branch='master',
# pollInterval=300))
# SCHEDULERS
# Configure the Schedulers, which decide how to react to incoming changes. In this
# case, just kick off a 'runtests' build
c['schedulers'] = []
# ----------------------------------------------------------------------------------------------------------------------
# QtPyVCP
# ----------------------------------------------------------------------------------------------------------------------
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="qtpyvcp_all",
change_filter=util.ChangeFilter(category=None, project='kcjengr/qtpyvcp', branch='main'),
treeStableTimer=30,
builderNames=["qtpyvcp-dev", "qtpyvcp-pi4-dev"]))
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="qtpyvcp_release",
change_filter=util.ChangeFilter(category='tag', project='kcjengr/qtpyvcp'),
treeStableTimer=30,
builderNames=["qtpyvcp", "qtpyvcp-pi4"]))
# ----------------------------------------------------------------------------------------------------------------------
# Probe Basic
# ----------------------------------------------------------------------------------------------------------------------
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="probe_basic_all",
change_filter=util.ChangeFilter(category=None, project='kcjengr/probe_basic', branch='main'),
treeStableTimer=30,
builderNames=["probe_basic-dev","probe_basic-pi4-dev"]))
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="probe_basic_release",
change_filter=util.ChangeFilter(category='tag', project='kcjengr/probe_basic'),
treeStableTimer=30,
builderNames=["probe_basic", "probe_basic-pi4"]))
# ----------------------------------------------------------------------------------------------------------------------
# TurBoNC
# ----------------------------------------------------------------------------------------------------------------------
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="tnc_release",
change_filter=util.ChangeFilter(category='tag', project='kcjengr/turbonc'),
treeStableTimer=30,
builderNames=["turbonc","turbonc-pi4"]))
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="tnc_all",
change_filter=util.ChangeFilter(category=None, project='kcjengr/turbonc'),
treeStableTimer=30,
builderNames=["turbonc-dev", "turbonc-pi4-dev"]))
# ----------------------------------------------------------------------------------------------------------------------
# Monokrom
# ----------------------------------------------------------------------------------------------------------------------
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="monokrom_all",
change_filter=util.ChangeFilter(category=None, project='kcjengr/monokrom', branch='main'),
treeStableTimer=30,
builderNames=["monokrom-dev", "monokrom-pi4-dev"]))
# ----------------------------------------------------------------------------------------------------------------------
# LinuxCNC
# ----------------------------------------------------------------------------------------------------------------------
# c['schedulers'].append(schedulers.SingleBranchScheduler(
# name="linuxcnc",
# change_filter=util.ChangeFilter(category=None, project='linuxcnc/linuxcnc', branch='master'),
# treeStableTimer=30,
# builderNames=["linuxcnc"]))
# 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.
c['builders'] = [
util.BuilderConfig(name="qtpyvcp", workernames=["kcjengr-worker"], factory=factory_qtpyvcp),
util.BuilderConfig(name="qtpyvcp-dev", workernames=["kcjengr-worker"], factory=factory_qtpyvcp_dev),
util.BuilderConfig(name="qtpyvcp-pi4", workernames=["kcjengr-arm64-worker"], factory=factory_qtpyvcp_pi4),
util.BuilderConfig(name="qtpyvcp-pi4-dev", workernames=["kcjengr-arm64-worker"], factory=factory_qtpyvcp_pi4_dev),
util.BuilderConfig(name="probe_basic", workernames=["kcjengr-worker"], factory=factory_probe_basic),
util.BuilderConfig(name="probe_basic-dev", workernames=["kcjengr-worker"], factory=factory_probe_basic_dev),
util.BuilderConfig(name="probe_basic-pi4", workernames=["kcjengr-arm64-worker"], factory=factory_probe_basic_pi4),
util.BuilderConfig(name="probe_basic-pi4-dev", workernames=["kcjengr-arm64-worker"], factory=factory_probe_basic_pi4_dev),
util.BuilderConfig(name="turbonc", workernames=["kcjengr-worker"], factory=factory_tnc),
util.BuilderConfig(name="turbonc-dev", workernames=["kcjengr-worker"], factory=factory_tnc_dev),
util.BuilderConfig(name="turbonc-pi4", workernames=["kcjengr-arm64-worker"], factory=factory_tnc_pi4),
util.BuilderConfig(name="turbonc-pi4-dev", workernames=["kcjengr-arm64-worker"], factory=factory_tnc_pi4_dev),
util.BuilderConfig(name="monokrom-dev", workernames=["kcjengr-worker"], factory=factory_monokrom_dev),
util.BuilderConfig(name="monokrom-pi4-dev", workernames=["kcjengr-arm64-worker"], factory=factory_monokrom_pi4_dev),
]
# BUILDBOT SERVICES
# '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.
matrix_reporter = MatrixReporter(serverUrl=bot_config.matrix_server,
userName=bot_config.matrix_user,
userToken=bot_config.matrix_user_token,
roomID=bot_config.matrix_room_id,
headers=None,
debug=bot_config.matrix_debug,
verify=None,
generators=None)
c['services'] = []
c['services'].append(matrix_reporter)
# PROJECT IDENTITY
# the 'title' string will appear at the top of this buildbot installation's
# home pages (linked to the 'titleURL').
c['title'] = "kcjengr CI"
c['titleURL'] = "https://repository.qtpyvcp.com/buildbot/"
# the 'buildbotURL' string should point to the location where the buildbot's
# 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'] = "https://repository.qtpyvcp.com/buildbot/"
# minimalistic config to activate new web UI
# c['www'] = dict(port=8010,
# plugins=dict(waterfall_view={}, console_view={}, grid_view={}))
c['www'] = {
"port": 8010,
"allowed_origins": ["*"],
"auth": util.CustomAuth(),
"plugins": {
"badges": {
"left_pad": 0,
"right_pad": 0,
"border_radius": 3,
"style": "badgeio"
},
"waterfall_view": {},
"console_view" :{},
"grid_view": {}
}
}
c['www']['auth'] = UserAuth()
c['www']['authz'] = util.Authz(
allowRules=[
util.AnyControlEndpointMatcher(role="admins")
],
roleMatchers=[
util.RolesFromUsername(roles=['admins'], usernames=['admin'])
]
)
# DB URL
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",
}
# GitHub WebHook receiver
c['www']['change_hook_dialects'] = {
'github': {
'secret': bot_config.github_phrase,
'strict': True,
'class': CustomGitHubEventHandler
},
}
# Don't report usage data to buildbot project
c['buildbotNetUsageData'] = None