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):
|
2020-06-19 11:09:23 +03:00
|
|
|
def __init__(self, masterConf):
|
|
|
|
BuildBotModule.__init__(self, masterConf)
|
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("LinuxBuilder", password),
|
2020-02-01 19:28:23 +03:00
|
|
|
worker.Worker("WindowsBuilder", password),
|
2021-04-11 10:28:27 +03:00
|
|
|
worker.Worker("AndroidBuilder_v7", password),
|
|
|
|
worker.Worker("AndroidBuilder_v8", password),
|
2021-07-19 16:15:35 +03:00
|
|
|
worker.Worker("AndroidBuilder_v8Qt6", password),
|
2020-04-15 10:27:24 +03:00
|
|
|
worker.Worker("LinuxCMakeBuilder", password),
|
2021-07-19 16:15:35 +03:00
|
|
|
worker.Worker("LinuxCMakeBuilderQt6", password),
|
2022-01-21 16:46:14 +03:00
|
|
|
worker.Worker("IOSCMakeBuilder", password),
|
2020-04-15 10:27:24 +03:00
|
|
|
worker.Worker("WindowsCMakeBuilder", password),
|
2020-02-03 14:49:55 +03:00
|
|
|
worker.Worker("RepoGen", password),
|
2020-10-08 11:04:54 +03:00
|
|
|
worker.Worker("Wasm32Builder", password),
|
2020-10-19 20:09:51 +03:00
|
|
|
worker.Worker("DocsGenerator", password),
|
2021-10-24 16:06:24 +03:00
|
|
|
worker.Worker("prodDeployer", 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}}
|