From 5e5115438db2ed356b69ff8b190917b87d916151 Mon Sep 17 00:00:00 2001 From: Jordan Lund Date: Fri, 19 Feb 2016 14:53:34 -0800 Subject: [PATCH] Bug 1160385 - adds version, buildnum support from tc releasetasks, DONTBUILD NPOTB a=testing r=rail MozReview-Commit-ID: 5otLdixBeX --HG-- extra : rebase_source : fb994369f87dc9b067b4b78b8631e1235356aaf8 extra : source : e0a91fd6584f4d06a8fae84e5ae2c3a96c17fdb0 --- .../scripts/release/generate-checksums.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/testing/mozharness/scripts/release/generate-checksums.py b/testing/mozharness/scripts/release/generate-checksums.py index 4e8c0e323669..e935b30a8583 100644 --- a/testing/mozharness/scripts/release/generate-checksums.py +++ b/testing/mozharness/scripts/release/generate-checksums.py @@ -12,8 +12,9 @@ from mozharness.base.script import BaseScript from mozharness.base.vcs.vcsbase import VCSMixin from mozharness.mozilla.checksums import parse_checksums_file from mozharness.mozilla.signing import SigningMixin +from mozharness.mozilla.buildbot import BuildbotMixin -class ChecksumsGenerator(BaseScript, VirtualenvMixin, SigningMixin, VCSMixin): +class ChecksumsGenerator(BaseScript, VirtualenvMixin, SigningMixin, VCSMixin, BuildbotMixin): config_options = [ [["--stage-product"], { "dest": "stage_product", @@ -98,6 +99,19 @@ class ChecksumsGenerator(BaseScript, VirtualenvMixin, SigningMixin, VCSMixin): def _pre_config_lock(self, rw_config): super(ChecksumsGenerator, self)._pre_config_lock(rw_config) + # override properties from buildbot properties here as defined by + # taskcluster properties + self.read_buildbot_config() + if not self.buildbot_config: + self.warning("Skipping buildbot properties overrides") + return + # TODO: version should come from repo + props = self.buildbot_config["properties"] + for prop in ['version', 'build_number']: + if props.get(prop): + self.info("Overriding %s with %s" % (prop, props[prop])) + self.config[prop] = props.get(prop) + # These defaults are set here rather in the config because default # lists cannot be completely overidden, only appended to. if not self.config.get("formats"):