[buildbot] phase2: make slave port configurable

LEDE Commits lede-commits at lists.infradead.org
Mon Nov 14 05:36:31 PST 2016


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/3294e6522ba4639de4591443e2ded312943fbb67

commit 3294e6522ba4639de4591443e2ded312943fbb67
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Mon Nov 14 13:46:07 2016 +0100

    phase2: make slave port configurable
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase2/config.ini.example | 1 +
 phase2/master.cfg         | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/phase2/config.ini.example b/phase2/config.ini.example
index edffc99..9fee514 100644
--- a/phase2/config.ini.example
+++ b/phase2/config.ini.example
@@ -3,6 +3,7 @@ title = LEDE Project
 title_url = http://lede-project.org/
 buildbot_url = http://phase2.builds.lede-project.org/
 homedir = ../phase1
+port = 9990
 
 [status]
 bind = tcp:8011:interface=127.0.0.1
diff --git a/phase2/master.cfg b/phase2/master.cfg
index f460ded..f12e479 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -25,6 +25,11 @@ c = BuildmasterConfig = {}
 # slave name and password must be configured on the slave.
 from buildbot.buildslave import BuildSlave
 
+slave_port = 9990
+
+if ini.has_option("general", "port"):
+	slave_port = ini.getint("general", "port")
+
 c['slaves'] = []
 
 for section in ini.sections():
@@ -40,7 +45,7 @@ for section in ini.sections():
 # 'slavePortnum' defines the TCP port to listen on for connections from slaves.
 # This must match the value configured into the buildslaves (with their
 # --master option)
-c['slavePortnum'] = 9990
+c['slavePortnum'] = slave_port
 
 # coalesce builds
 c['mergeRequests'] = True



More information about the lede-commits mailing list