phase2: make sdk_password setting optional
[buildbot.git] / phase2 / master.cfg
index 08c77c1f3aebd30f5630c9d7f08cfd05f71cec1e..98a92438ea2c0696facd525a9783b4466a8522b2 100644 (file)
@@ -11,6 +11,8 @@ from buildbot import locks
 ini = ConfigParser.ConfigParser()
 ini.read("./config.ini")
 
+buildbot_url = ini.get("general", "buildbot_url")
+
 # This is a sample buildmaster config file. It must be installed as
 # 'master.cfg' in your buildmaster's base directory.
 
@@ -70,6 +72,8 @@ rsync_sdk_pat = "lede-sdk-*.tar.xz"
 
 if ini.has_option("rsync", "sdk_url"):
        rsync_sdk_url = ini.get("rsync", "sdk_url")
+
+if ini.has_option("rsync", "sdk_password"):
        rsync_sdk_key = ini.get("rsync", "sdk_password")
 
 if ini.has_option("rsync", "sdk_pattern"):
@@ -180,14 +184,14 @@ for arch in arches:
        factory.addStep(ShellCommand(
                name = "cleanold",
                description = "Cleaning previous builds",
-               command = ["./cleanup.sh", WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "full"],
+               command = ["./cleanup.sh", buildbot_url, WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "full"],
                haltOnFailure = True,
                timeout = 2400))
 
        factory.addStep(ShellCommand(
                name = "cleanup",
                description = "Cleaning work area",
-               command = ["./cleanup.sh", WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "single"],
+               command = ["./cleanup.sh", buildbot_url, WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "single"],
                haltOnFailure = True,
                timeout = 2400))
 
@@ -402,7 +406,7 @@ c['titleURL'] = ini.get("general", "title_url")
 # with an externally-visible host name which the buildbot cannot figure out
 # without some help.
 
-c['buildbotURL'] = ini.get("general", "buildbot_url")
+c['buildbotURL'] = buildbot_url
 
 ####### DB URL