From: Jo-Philipp Wich Date: Mon, 14 Nov 2016 13:18:57 +0000 (+0100) Subject: phase2: make SDK URL configurable X-Git-Tag: v1~232 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c61d2064958263fd707a4f0fb7a822638fd671a0;p=buildbot.git 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 --- 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@example.org::upload-packages binary_password = example source_url = user@example.org::upload-sources source_password = example2 +sdk_url = user@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))