[buildbot] phase2: make SDK URL configurable
LEDE Commits
lede-commits at lists.infradead.org
Mon Nov 14 05:36:33 PST 2016
jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/c61d2064958263fd707a4f0fb7a822638fd671a0
commit c61d2064958263fd707a4f0fb7a822638fd671a0
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Mon Nov 14 14:18:57 2016 +0100
phase2: make SDK URL configurable
Also allow to specify the SDK file name pattern and make the decompression
format agnostic.
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
phase2/config.ini.example | 3 +++
phase2/master.cfg | 19 ++++++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/phase2/config.ini.example b/phase2/config.ini.example
index e48f66e..0ad799b 100644
--- a/phase2/config.ini.example
+++ b/phase2/config.ini.example
@@ -15,6 +15,9 @@ binary_url = user at example.org::upload-packages
binary_password = example
source_url = user at example.org::upload-sources
source_password = example2
+sdk_url = user at example.org::download-binary
+sdk_password = example3
+sdk_pattern = lede-sdk-*.tar.xz
[gpg]
keyid = 626471F1
diff --git a/phase2/master.cfg b/phase2/master.cfg
index ab42383..08c77c1 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -64,6 +64,17 @@ if ini.has_option("rsync", "source_url"):
rsync_src_url = ini.get("rsync", "source_url")
rsync_src_key = ini.get("rsync", "source_password")
+rsync_sdk_url = None
+rsync_sdk_key = None
+rsync_sdk_pat = "lede-sdk-*.tar.xz"
+
+if ini.has_option("rsync", "sdk_url"):
+ rsync_sdk_url = ini.get("rsync", "sdk_url")
+ rsync_sdk_key = ini.get("rsync", "sdk_password")
+
+if ini.has_option("rsync", "sdk_pattern"):
+ rsync_sdk_pat = ini.get("rsync", "sdk_pattern")
+
gpg_keyid = None
gpg_comment = "Unattended build signature"
gpg_passfile = "/dev/null"
@@ -189,13 +200,15 @@ for arch in arches:
factory.addStep(ShellCommand(
name = "downloadsdk",
description = "Downloading SDK archive",
- command = ["rsync", "-va", "downloads.lede-project.org::downloads/snapshots/targets/%s/%s/lede-sdk-*.tar.xz" %(ts[0], ts[1]), "sdk.tar.xz"],
- haltOnFailure = True))
+ command = ["rsync", "-va", "%s/%s/%s/%s" %(rsync_sdk_url, ts[0], ts[1], rsync_sdk_pat), "sdk.archive"],
+ env={'RSYNC_PASSWORD': rsync_sdk_key},
+ haltOnFailure = True,
+ logEnviron = False))
factory.addStep(ShellCommand(
name = "unpacksdk",
description = "Unpacking SDK archive",
- command = ["tar", "--strip-components=1", "-C", "sdk/", "-vxJf", "sdk.tar.xz"],
+ command = ["tar", "--strip-components=1", "-C", "sdk/", "-vxf", "sdk.archive"],
haltOnFailure = True))
factory.addStep(FileDownload(mastersrc=home_dir+'/key-build', slavedest="sdk/key-build", mode=0600))
More information about the lede-commits
mailing list