Bug 1391680 - Bug 1391680 - Pass mar_signing_format to releasetasks. r=mtabara
authorJohan Lorenzo <jlorenzo@mozilla.com>
Fri, 18 Aug 2017 21:58:41 +0300
changeset 7780 23a0ecce9979d79f86e10c903db421d5efa12dcb
parent 7779 82950f5cdae802f95f50d9d1d668168d30a90a17
child 7781 d11ca3f8b0be653a25bd7d32524524e0b819a71c
push id5760
push usermtabara@mozilla.com
push dateFri, 18 Aug 2017 18:59:04 +0000
reviewersmtabara
bugs1391680
Bug 1391680 - Bug 1391680 - Pass mar_signing_format to releasetasks. r=mtabara MozReview-Commit-ID: AmauIZQAkTp
buildfarm/release/release-runner.py
buildfarm/release/releasetasks_graph_gen.py
lib/python/kickoff/__init__.py
--- a/buildfarm/release/release-runner.py
+++ b/buildfarm/release/release-runner.py
@@ -19,17 +19,17 @@ from taskcluster import Scheduler, Index
 from taskcluster.utils import slugId
 import yaml
 
 site.addsitedir(path.join(path.dirname(__file__), "../../lib/python"))
 
 from kickoff import (get_partials, ReleaseRunner,
                      make_task_graph_strict_kwargs, long_revision,
                      get_l10n_config, get_en_US_config, email_release_drivers,
-                     bump_version, get_funsize_product)
+                     bump_version, get_funsize_product, get_mar_signing_format)
 from kickoff.sanity.base import SanityException, is_candidate_release
 from kickoff.sanity.revisions import RevisionsSanitizer
 from kickoff.sanity.l10n import L10nSanitizer
 from kickoff.sanity.partials import PartialsSanitizer
 from kickoff.build_status import are_en_us_builds_completed
 from release.info import readBranchConfig
 from release.l10n import parsePlainL10nChangesets
 from release.versions import getAppVersion
@@ -470,16 +470,17 @@ def main(options):
                 "balrog_username": balrog_username,
                 "balrog_password": balrog_password,
                 "beetmover_aws_access_key_id": beetmover_aws_access_key_id,
                 "beetmover_aws_secret_access_key": beetmover_aws_secret_access_key,
                 # TODO: stagin specific, make them configurable
                 "signing_class": branchConfig['signing_class'][release["product"]],
                 "accepted_mar_channel_id": branchConfig.get('accepted_mar_channel_id', {}).get(release["product"]),
                 "signing_cert": branchConfig['signing_cert'][release["product"]],
+                "mar_signing_format": get_mar_signing_format(release["version"]),
                 "moz_disable_mar_cert_verification": branchConfig.get('moz_disable_mar_cert_verification'),
                 "root_home_dir": branchConfig['root_home_dir'][release["product"]],
                 "bouncer_enabled": branchConfig["bouncer_enabled"],
                 "updates_builder_enabled": branchConfig["updates_builder_enabled"],
                 "update_verify_enabled": branchConfig["update_verify_enabled"],
                 "release_channels": release_channels,
                 "final_verify_channels": final_verify_channels,
                 "final_verify_platforms": branchConfig['release_platforms'],
--- a/buildfarm/release/releasetasks_graph_gen.py
+++ b/buildfarm/release/releasetasks_graph_gen.py
@@ -4,17 +4,17 @@ import logging
 import os
 from optparse import OptionParser
 import site
 import yaml
 
 site.addsitedir(os.path.join(os.path.dirname(__file__), "../../lib/python"))
 
 from kickoff import get_partials, ReleaseRunner, make_task_graph_strict_kwargs
-from kickoff import get_l10n_config, get_en_US_config
+from kickoff import get_l10n_config, get_en_US_config, get_mar_signing_format
 from kickoff import bump_version
 
 from release.versions import getAppVersion
 from util.file import load_config, get_config
 
 from taskcluster import Scheduler, Index, Queue
 from taskcluster.utils import slugId
 
@@ -53,16 +53,17 @@ def main(release_runner_config, release_
         "balrog_api_root": release_config["balrog_api_root"],
         "build_tools_repo_path": release_config['build_tools_repo_path'],
         "tuxedo_server_url": release_config['tuxedo_server_url'],
         "uptake_monitoring_enabled": release_config['uptake_monitoring_enabled'],
         "beetmover_candidates_bucket": release_config["beetmover_candidates_bucket"],
         "signing_class": release_config["signing_class"],
         "accepted_mar_channel_id": release_config.get("accepted_mar_channel_id"),
         "signing_cert": release_config["signing_cert"],
+        "mar_signing_format": get_mar_signing_format(release_config["version"]),
         "moz_disable_mar_cert_verification": release_config.get("moz_disable_mar_cert_verification"),
         "root_home_dir": release_config["root_home_dir"],
         "bouncer_enabled": release_config["bouncer_enabled"],
         "updates_builder_enabled": release_config["updates_builder_enabled"],
         "update_verify_enabled": release_config["update_verify_enabled"],
         "push_to_candidates_enabled": release_config['push_to_candidates_enabled'],
         # TODO: temporary config enabled during 53 Fennec beta cycle
         "candidates_fennec_enabled": release_config.get('candidates_fennec_enabled'),
--- a/lib/python/kickoff/__init__.py
+++ b/lib/python/kickoff/__init__.py
@@ -278,17 +278,17 @@ def bump_version(version):
 
 def make_task_graph_strict_kwargs(appVersion, balrog_api_root, balrog_password, balrog_username,
                                   beetmover_aws_access_key_id, beetmover_aws_secret_access_key,
                                   beetmover_candidates_bucket, bouncer_enabled, branch, buildNumber,
                                   build_tools_repo_path, candidates_fennec_enabled,
                                   checksums_enabled, binary_transparency_enabled, en_US_config,
                                   root_home_dir, extra_balrog_submitter_params, final_verify_channels,
                                   final_verify_platforms, uptake_monitoring_platforms,
-                                  funsize_balrog_api_root, l10n_config, signing_cert,
+                                  funsize_balrog_api_root, l10n_config, signing_cert, mar_signing_format,
                                   l10n_changesets, mozharness_changeset, next_version,
                                   partial_updates, partner_repacks_platforms,
                                   eme_free_repacks_platforms, sha1_repacks_platforms,
                                   postrelease_bouncer_aliases_enabled, uptake_monitoring_enabled,
                                   postrelease_version_bump_enabled, moz_disable_mar_cert_verification,
                                   postrelease_mark_as_shipped_enabled, accepted_mar_channel_id, public_key,
                                   product, stage_product, funsize_product, push_to_candidates_enabled,
                                   push_to_releases_automatic, push_to_releases_enabled, release_channels,
@@ -337,16 +337,17 @@ def make_task_graph_strict_kwargs(appVer
         push_to_releases_automatic=push_to_releases_automatic,
         push_to_releases_enabled=push_to_releases_enabled,
         release_channels=release_channels,
         repo_path=repo_path,
         revision=revision,
         signing_class=signing_class,
         accepted_mar_channel_id=accepted_mar_channel_id,
         signing_cert=signing_cert,
+        mar_signing_format=mar_signing_format,
         moz_disable_mar_cert_verification=moz_disable_mar_cert_verification,
         root_home_dir=root_home_dir,
         signing_pvt_key=signing_pvt_key,
         source_enabled=source_enabled,
         stage_product=stage_product,
         tuxedo_server_url=tuxedo_server_url,
         update_verify_enabled=update_verify_enabled,
         updates_builder_enabled=updates_builder_enabled,
@@ -368,8 +369,14 @@ def make_task_graph_strict_kwargs(appVer
     from releasetasks import make_task_graph
     return make_task_graph(**kwargs)
 
 
 def get_funsize_product(product_name):
     if product_name == 'devedition':    # See bug 1366075
         return 'firefox'
     return product_name
+
+
+def get_mar_signing_format(version):
+    # XXX mar_sha384 was introduced in 56.0b4. That version wasn't used for comparison because
+    # the string '56.0.1' is considered smaller than '56.0b4'
+    return 'mar' if version < '56.0' else 'mar_sha384'