gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-deployment] branch master updated: Tune auditor repo


From: gnunet
Subject: [GNUnet-SVN] [taler-deployment] branch master updated: Tune auditor reports BB.
Date: Wed, 17 Apr 2019 15:16:26 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 4caedfb  Tune auditor reports BB.
4caedfb is described below

commit 4caedfbd6f52aed405ea5bf530f4eed50df0eb23
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Apr 17 15:15:59 2019 +0200

    Tune auditor reports BB.
---
 buildbot/make_auditor_reports.sh |  3 ++-
 buildbot/master.cfg              | 38 ++++++++++++++++++++++++++++++++------
 2 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/buildbot/make_auditor_reports.sh b/buildbot/make_auditor_reports.sh
index e38bbb6..3868049 100755
--- a/buildbot/make_auditor_reports.sh
+++ b/buildbot/make_auditor_reports.sh
@@ -45,4 +45,5 @@ rm "${REPORT_FILE_NOEXT}.aux"
 chmod g+r "${REPORT_FILE_NOEXT}.pdf"
 mv "${REPORT_FILE_NOEXT}.pdf" "${REPORTS_DIRECTORY}"
 
-echo "The file ${REPORT_FILE_NOEXT}.pdf" has been correctly generated.
+echo "The file ${REPORTS_DIRECTORY}/${REPORT_FILE_NOEXT}.pdf" \
+  "has been correctly generated."
diff --git a/buildbot/master.cfg b/buildbot/master.cfg
index 77f3357..a6267bf 100644
--- a/buildbot/master.cfg
+++ b/buildbot/master.cfg
@@ -36,6 +36,10 @@ c["workers"] = [
     worker.Worker("wallet-worker", "wallet-pass"),
     worker.Worker("auditor-worker", "auditor-pass")]
 
+# Maps unix users (typically found on Gv) to worker names.
+NAMEMAP = {"test-green": "builder-worker-green",
+           "test-blue": "builder-worker-blue"}
+
 # '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
@@ -76,7 +80,7 @@ NIGHTLY_SCHEDULER = schedulers.Nightly(
     name="nightly-scheduler",
     builderNames=["lcov-builder",
                   "auditor-builder"],
-    branch="master", # why mandatory?
+    branch="master",
     hour=6,
     minute=0)
 
@@ -387,8 +391,33 @@ LCOV_BUILDER = util.BuilderConfig(
     workernames=["lcov-worker"],
     factory=LCOV_FACTORY)
 
+##
+# Helper function that picks the active deployment between
+# blue and green and schedules it as the next worker for producing
+# auditor reports.
+def pick_active_color(builder, workers_list, build_request):
+    f = open("/home/test/active", "r")
+    if not f:
+        print("'test' doesn't specify the active color, abort")
+        f.close()
+        return None
+    active = f.readline().rstrip()
+    print("Found active color: %s" % str(nonactive))
+
+    for worker in workers_list:
+        if NAMEMAP.get(active) == worker.worker.workername:
+            f.close()
+            print("Scheduling worker: %s" % str(worker))
+            return worker
+
+    print("Couldn't find the active worker, aborting.")
+    f.close()
+    return None
+
+
 AUDITOR_BUILDER = util.BuilderConfig(
     name="auditor-builder",
+    nextWorker=pick_active_color,
     workernames=["auditor-worker"],
     factory=AUDITOR_FACTORY)
 
@@ -416,16 +445,13 @@ def pick_inactive_color(builder, workers_list, 
build_request):
     nonactive = f.readline().rstrip()
     print("Found nonactive color: %s" % str(nonactive))
 
-    namemap = {"test-green": "builder-worker-green",
-               "test-blue": "builder-worker-blue"}
-
     for worker in workers_list:
-        if namemap.get(nonactive) == worker.worker.workername:
+        if NAMEMAP.get(nonactive) == worker.worker.workername:
             f.close()
             print("Scheduling worker: %s" % str(worker))
             return worker
 
-    print("Couldn't find the right worker, aborting.")
+    print("Couldn't find the inactive worker, aborting.")
     f.close()
     return None
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]