QuasarAppCI/BuildBotLib/buildBotWorkers.py

39 lines
1.4 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
2020-01-31 15:02:12 +03:00
from pathlib import Path
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 15:02:12 +03:00
scr = SecretManager(str(Path.home()) + "/buildBotSecret/secret.json")
2020-01-31 14:55:49 +03:00
2020-01-31 15:02:12 +03:00
password = scr.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),
2020-02-01 19:28:23 +03:00
worker.Worker("WindowsBuilder", password),
2020-02-03 14:49:55 +03:00
worker.Worker("RepoGen", 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}}