taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 20e418250169a70a730c6089daf718a37af5b2d2
parent 13daf9bc6a75fc0e619d9adeb694fffd32be1735
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 19 Apr 2019 18:33:28 +0200

BB.

Do not use "names maps" to pick the worker, but rather
match against its base directory.

Diffstat:
Mbuildbot/master.cfg | 14++++----------
1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -486,10 +486,6 @@ LCOV_BUILDER = util.BuilderConfig( # auditor reports. def pick_active_color(builder, workers_list, build_request): - # Maps unix users (typically found on Gv) to worker names. - NAMEMAP = {"test-green": "auditor-worker-green", - "test-blue": "auditor-worker-blue"} - f = open("/home/test/active", "r") if not f: print("'test' doesn't specify the active color, abort") @@ -499,7 +495,8 @@ def pick_active_color(builder, workers_list, build_request): print("Found active color: %s" % str(active)) for worker in workers_list: - if NAMEMAP.get(active) == worker.worker.workername: + if re.search("^/home/%s" % active, + worker.worker.basedir): f.close() print("Scheduling worker: %s" % str(worker)) return worker @@ -534,10 +531,6 @@ DEMO_SERVICES_CHECKER_BUILDER = util.BuilderConfig( # Taler. def pick_inactive_color(builder, workers_list, build_request): - # Maps unix users (typically found on Gv) to worker names. - NAMEMAP = {"test-green": "builder-worker-green", - "test-blue": "builder-worker-blue"} - f = open("/home/test/nonactive", "r") if not f: print("'test' doesn't specify the nonactive color, abort") @@ -547,7 +540,8 @@ def pick_inactive_color(builder, workers_list, build_request): print("Found nonactive color: %s" % str(nonactive)) for worker in workers_list: - if NAMEMAP.get(nonactive) == worker.worker.workername: + if re.search("^/home/%s" % nonactive, + worker.worker.basedir): f.close() print("Scheduling worker: %s" % str(worker)) return worker