зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1215204 - Add bouncer submitter to release promotion graph r=rail
This commit is contained in:
Родитель
7f81b68d25
Коммит
d9907fdf47
|
@ -10,10 +10,11 @@ sys.path.insert(1, os.path.dirname(sys.path[0]))
|
|||
|
||||
from mozharness.base.script import BaseScript
|
||||
from mozharness.mozilla.bouncer.submitter import BouncerSubmitterMixin
|
||||
from mozharness.mozilla.buildbot import BuildbotMixin
|
||||
from mozharness.mozilla.purge import PurgeMixin
|
||||
|
||||
|
||||
class BouncerSubmitter(BaseScript, PurgeMixin, BouncerSubmitterMixin):
|
||||
class BouncerSubmitter(BaseScript, PurgeMixin, BouncerSubmitterMixin, BuildbotMixin):
|
||||
config_options = [
|
||||
[["--repo"], {
|
||||
"dest": "repo",
|
||||
|
@ -61,6 +62,9 @@ class BouncerSubmitter(BaseScript, PurgeMixin, BouncerSubmitterMixin):
|
|||
'download-shipped-locales',
|
||||
'submit',
|
||||
],
|
||||
config={
|
||||
'buildbot_json_path' : 'buildprops.json'
|
||||
}
|
||||
)
|
||||
self.locales = None
|
||||
self.credentials = None
|
||||
|
@ -68,6 +72,18 @@ class BouncerSubmitter(BaseScript, PurgeMixin, BouncerSubmitterMixin):
|
|||
def _pre_config_lock(self, rw_config):
|
||||
super(BouncerSubmitter, self)._pre_config_lock(rw_config)
|
||||
|
||||
#override properties from buildbot properties here as defined by taskcluster properties
|
||||
self.read_buildbot_config()
|
||||
|
||||
#check if release promotion is true first before overwriting these properties
|
||||
if self.buildbot_config["properties"].get("release_promotion"):
|
||||
for prop in ['product', 'version', 'build_number', 'revision', 'bouncer_submitter_config', ]:
|
||||
if self.buildbot_config["properties"].get(prop):
|
||||
self.info("Overriding %s with %s" % (prop, self.buildbot_config["properties"].get(prop)))
|
||||
self.config[prop] = self.buildbot_config["properties"].get(prop)
|
||||
if self.buildbot_config["properties"].get("partial_versions"):
|
||||
self.config["prev_versions"] = self.buildbot_config["properties"].get("partial_versions").split(", ")
|
||||
|
||||
for opt in ["version", "credentials_file", "bouncer-api-prefix"]:
|
||||
if opt not in self.config:
|
||||
self.fatal("%s must be specified" % opt)
|
||||
|
@ -157,7 +173,7 @@ class BouncerSubmitter(BaseScript, PurgeMixin, BouncerSubmitterMixin):
|
|||
product_name = product_name_tmpl % subs
|
||||
if self.product_exists(product_name):
|
||||
self.warning("Product %s already exists. Skipping..." %
|
||||
product_name)
|
||||
product_name)
|
||||
continue
|
||||
self.info("Adding partial updates for %s" % product_name)
|
||||
self.api_add_product(
|
||||
|
|
Загрузка…
Ссылка в новой задаче