コード例 #1
0
def get_workers():
    """
    Entrypoint to configure the workers in the Master.

    Return a list of Workers.
    """
    return [
        worker.LocalWorker("default"),
        worker.LocalWorker("worker-1"),
        worker.LocalWorker("worker-2"),
        worker.LocalWorker("worker-3"),
        worker.LocalWorker("worker-4")
    ]
コード例 #2
0
 def __init__(
     self,
     settings,
     name,
     tags=None,
     branches=None,
     parallel_builders=None,
     parallel_tests=None,
 ):
     self.name = name
     self.tags = tags or set()
     self.branches = branches
     self.parallel_builders = parallel_builders
     self.parallel_tests = parallel_tests
     worker_settings = settings.workers[name]
     owner = name.split("-")[0]
     owner_settings = settings.owners[owner]
     pw = worker_settings.get("password", None) or owner_settings.password
     owner_email = owner_settings.get("email", None)
     emails = list(
         map(
             str,
             filter(None,
                    (settings.get("status_email", None), owner_email))))
     if settings.use_local_worker:
         self.bb_worker = _worker.LocalWorker(name)
     else:
         self.bb_worker = _worker.Worker(name,
                                         str(pw),
                                         notify_on_missing=emails,
                                         keepalive_interval=KEEPALIVE)
コード例 #3
0
# a shorter alias to save typing.
c: Any
BuildmasterConfig: Any
c = BuildmasterConfig = {}

####### SECRETS
# We don't use a secretsProvider. It wouldn't work together with
# the reporters.

####### 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.LocalWorker("director-worker", max_builds=int(env["MAX_BUILDS"]))
]

# '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.

# leave empty, the github hook should take care of it.
コード例 #4
0
ファイル: dev.py プロジェクト: delroth/sadm
 "titleURL":
 "/",
 "buildbotURL":
 "http://localhost:{}/".format(PORT),
 "protocols": {
     "pb": {
         "port": 9989
     },
 },
 "change_source": [
     GitPoller(repourl=env('BB_REPOURL',
                           'https://github.com/dolphin-emu/dolphin.git'),
               pollInterval=5),
 ],
 "workers": [
     worker.LocalWorker("test-worker"),
 ],
 "builders": [
     BuilderConfig(name="test-builder",
                   workernames=["test-worker"],
                   factory=make_test_factory()),
     # TODO: add relevant builders from prod conf
 ],
 "schedulers": [
     AnyBranchScheduler(name="test-scheduler",
                        builderNames=["test-builder"]),
 ],
 "www": {
     "port":
     PORT,
     "auth":
コード例 #5
0
 def createWorkerConfigLocalWorker(self, config, name):
     return worker.LocalWorker(name)
コード例 #6
0
ファイル: master.py プロジェクト: ostree/buildbot
#

# Also define a shorter alias ("c") to save typing:
BuildmasterConfig = c = setup.buildmaster_config_base()

#
# WORKERS
#
# The 'workers' list defines the set of recognized workers. Each element is a
# Worker object, specifying a unique worker name and password.
#

# This worker MUST only be used for build jobs requiring access to the
# Docker socket. The builders tied to this worker should be carefully reviewed
# as some nasty stuff can be done when a user has access to the Docker daemon:
docker_operations_worker = worker.LocalWorker('_docker-client-localworker')

# Most of the Docker latent workers are there to ensure that the CLIP OS
# toolkit is functional on most of the popular Linux distributions. It makes
# few sense to build each time the CLIP OS builds on all the workers, instead
# we chose a reference Docker worker flavor (on which we are going to do all
# the builds) and we leave the rest of the flavors for weekly builds just to
# make sure that the CLIP OS toolkit is functional on those flavors of worker.
reference_worker_flavor = 'debian-sid'
unprivileged_reference_workers = []  # changed below
privileged_reference_workers = []  # changed below

# All the Docker latent workers defined and usable by the CLIP OS project
# buildbot:
all_clipos_docker_latent_workers = []
for flavor in clipos.workers.DockerLatentWorker.FLAVORS: