Bug 1365590 - Pass --stage-product to patcher config bumper r=bhearsum a=release DONTBUILD draft
authorRail Aliiev <rail@mozilla.com>
Wed, 24 May 2017 08:26:50 -0400
changeset 583724 0eb7d1afe58335a657df55f0255423f089e0a275
parent 583723 9d23e7a1da5e82588677d722255cefa801d4fe8a
child 630169 badc85483979df9e9919f454d5827bf065c580d9
push id60511
push userbmo:rail@mozilla.com
push dateWed, 24 May 2017 14:14:06 +0000
reviewersbhearsum, release
bugs1365590
milestone55.0a1
Bug 1365590 - Pass --stage-product to patcher config bumper r=bhearsum a=release DONTBUILD MozReview-Commit-ID: 8FKkuxqinfG
testing/mozharness/configs/releases/updates_firefox_devedition.py
testing/mozharness/scripts/release/updates.py
--- a/testing/mozharness/configs/releases/updates_firefox_devedition.py
+++ b/testing/mozharness/configs/releases/updates_firefox_devedition.py
@@ -19,17 +19,22 @@ config = {
     "download_domain": "download.mozilla.org",
     "balrog_url": "https://aus5.mozilla.org",
     "balrog_username": "ffxbld",
     "update_channels": {
         "aurora": {
             "version_regex": r"^.*$",
             "requires_mirrors": True,
             "patcher_config": "mozDevedition-branch-patcher2.cfg",
+            # Allow to override the patcher config product name, regardless
+            # the value set by buildbot properties
+            "patcher_config_product_override": "firefox",
             "update_verify_channel": "aurora-localtest",
             "mar_channel_ids": [],
             "channel_names": ["aurora", "aurora-localtest", "aurora-cdntest"],
             "rules_to_update": ["devedition-cdntest", "devedition-localtest"],
             "publish_rules": ["devedition"],
         },
     },
     "balrog_use_dummy_suffix": False,
+    "stage_product": "devedition",
+    "bouncer_product": "devedition",
 }
--- a/testing/mozharness/scripts/release/updates.py
+++ b/testing/mozharness/scripts/release/updates.py
@@ -173,16 +173,20 @@ class UpdatesBumper(MercurialScript, Bui
 
     def query_patcher_config(self, channel_config):
         dirs = self.query_abs_dirs()
         patcher_config = os.path.join(
             dirs["abs_tools_dir"], "release/patcher-configs",
             channel_config["patcher_config"])
         return patcher_config
 
+    def query_patcher_config_product(self, channel_config):
+        return channel_config.get("patcher_config_product_override") or \
+            self.config["product"]
+
     def query_update_verify_config(self, channel, platform):
         dirs = self.query_abs_dirs()
         uvc = os.path.join(
             dirs["abs_tools_dir"], "release/updates",
             "{}-{}-{}.cfg".format(channel, self.config["product"], platform))
         return uvc
 
     def bump_patcher_config(self, channel_config):
@@ -191,60 +195,68 @@ class UpdatesBumper(MercurialScript, Bui
         # from tasks.
         dirs = self.query_abs_dirs()
         env = {"PERL5LIB": os.path.join(dirs["abs_tools_dir"], "lib/perl")}
         partial_versions = [v[0] for v in
                             self.query_matching_partials(channel_config)]
         script = os.path.join(
             dirs["abs_tools_dir"], "release/patcher-config-bump.pl")
         patcher_config = self.query_patcher_config(channel_config)
+        patcher_config_product = self.query_patcher_config_product(channel_config)
         cmd = [self.query_exe("perl"), script]
         cmd.extend([
-            "-p", self.config["product"],
-            "-r", self.config["product"].capitalize(),
+            "-p", patcher_config_product,
+            "-r", patcher_config_product.capitalize(),
             "-v", self.config["version"],
             "-a", self.config["appVersion"],
             "-o", get_previous_version(
                 self.config["version"], partial_versions),
             "-b", str(self.config["build_number"]),
             "-c", patcher_config,
             "-f", self.config["archive_domain"],
             "-d", self.config["download_domain"],
             "-l", self.query_shipped_locales_path(),
         ])
         for v in partial_versions:
             cmd.extend(["--partial-version", v])
         for p in self.config["platforms"]:
             cmd.extend(["--platform", p])
         for mar_channel_id in channel_config["mar_channel_ids"]:
             cmd.extend(["--mar-channel-id", mar_channel_id])
+        if "stage_product" in self.config:
+            cmd.extend(["--stage-product", self.config["stage_product"]])
+        if "bouncer_product" in self.config:
+            cmd.extend(["--bouncer-product", self.config["bouncer_product"]])
         self.run_command(cmd, halt_on_failure=True, env=env)
 
     def bump_update_verify_configs(self, channel, channel_config):
         dirs = self.query_abs_dirs()
         script = os.path.join(
             dirs["abs_tools_dir"],
             "scripts/build-promotion/create-update-verify-config.py")
         patcher_config = self.query_patcher_config(channel_config)
+        patcher_config_product = self.query_patcher_config_product(channel_config)
         for platform in self.config["platforms"]:
             cmd = [self.query_exe("python"), script]
             output = self.query_update_verify_config(channel, platform)
             cmd.extend([
                 "--config", patcher_config,
                 "--platform", platform,
                 "--update-verify-channel",
                 channel_config["update_verify_channel"],
                 "--output", output,
                 "--archive-prefix", self.config["archive_prefix"],
                 "--previous-archive-prefix",
                 self.config["previous_archive_prefix"],
-                "--product", self.config["product"],
+                "--product", patcher_config_product,
                 "--balrog-url", self.config["balrog_url"],
                 "--build-number", str(self.config["build_number"]),
             ])
+            if "stage_product" in self.config:
+                cmd.extend(["--stage-product", self.config["stage_product"]])
 
             self.run_command(cmd, halt_on_failure=True)
 
     def tag(self):
         dirs = self.query_abs_dirs()
         tags = ["{product}_{version}_BUILD{build_number}_RUNTIME",
                 "{product}_{version}_RELEASE_RUNTIME"]
         tags = [t.format(product=self.config["product"].upper(),