Bug 1160385 - adds version, buildnum support from tc releasetasks, DONTBUILD NPOTB a=testing r=rail

MozReview-Commit-ID: 5otLdixBeX
This commit is contained in:
Jordan Lund 2016-02-19 14:53:34 -08:00
parent 712262f309
commit a012a15081

View File

@ -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"):