4
0
mirror of https://github.com/QuasarApp/QuasarAppCI.git synced 2025-04-28 06:34:35 +00:00

37 lines
1.3 KiB
Python
Raw Normal View History

2019-07-22 10:20:59 +03:00
# This Python file uses the following encoding: utf-8
2019-12-26 13:48:06 +03:00
from BuildBotLib.buildBotModule import BuildBotModule
from buildbot.plugins import worker
2020-01-31 14:55:49 +03:00
from BuildBotLib.secretManager import SecretManager
2019-07-22 10:20:59 +03:00
2019-12-26 13:48:06 +03:00
class BuildBotWorkers(BuildBotModule):
2019-07-22 10:20:59 +03:00
def __init__(self):
BuildBotModule.__init__(self)
2019-12-26 13:48:06 +03:00
# WORKERS
2019-07-22 10:20:59 +03:00
2019-12-26 13:48:06 +03:00
# The 'workers' list defines the set
# of recognized workers. Each element is
# a Worker object, specifying a unique worker
# name and password. The same
2019-07-22 10:20:59 +03:00
# worker name and password must be configured on the worker.
2020-01-31 14:55:49 +03:00
secret = SecretManager(self.home + "/buildBotSecret/secret.json")
password = secret.getValue('WorkerPass')
2019-07-22 10:20:59 +03:00
2020-01-31 14:55:49 +03:00
self.masterConf['workers'] = [
worker.Worker("AndroidBuilder", password),
worker.Worker("LinuxBuilder", password),
worker.Worker("WindowBuilder", password),
2019-07-22 10:20:59 +03:00
]
2019-12-26 13:48:06 +03:00
# 'protocols' contains information
# about protocols which master will use for
# communicating with workers.
# You must define at least 'port' option that workers
2019-07-22 10:20:59 +03:00
# could connect to your master with this protocol.
# 'port' must match the value configured into the workers (with their
# --master option)
self.masterConf['protocols'] = {'pb': {'port': 9989}}