Bug 1538995 - update bouncer aliases for partner products when shipping, r=aki, a=release DONTBUILD
authorNick Thomas <nthomas@mozilla.com>
Thu, 27 Jun 2019 03:57:30 +0000
changeset 537294 2254823049a2d2512d47be8da403a3896d2eb490
parent 537293 1f1987d0fef378d50f9d1c7b036ff9508ca17345
child 537295 a1e296bf253a26693af327a87e589b8ede773825
push id2128
push usernthomas@mozilla.com
push dateWed, 14 Aug 2019 02:49:25 +0000
treeherdermozilla-release@2254823049a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki, release
bugs1538995
milestone68.0.2
Bug 1538995 - update bouncer aliases for partner products when shipping, r=aki, a=release DONTBUILD Pass partner aliases down to the bouncer scriptworker so it can update those too. Matching change to bouncerscript at https://github.com/mozilla-releng/bouncerscript/pull/57. Differential Revision: https://phabricator.services.mozilla.com/D35483
taskcluster/ci/release-bouncer-aliases/kind.yml
taskcluster/taskgraph/transforms/bouncer_aliases.py
--- a/taskcluster/ci/release-bouncer-aliases/kind.yml
+++ b/taskcluster/ci/release-bouncer-aliases/kind.yml
@@ -92,11 +92,20 @@ jobs:
                 jamun:
                     firefox-esr-latest-ssl: installer-ssl
                     firefox-esr-latest: installer
                 maple:
                     firefox-beta-latest-ssl: installer-ssl
                     firefox-beta-latest: installer
                     firefox-beta-stub: stub-installer
                 default: {}
+        partner-bouncer-products-per-alias:
+            by-project:
+                mozilla-beta:
+                    partner-firefox-beta-PARTNER-latest: installer
+                    partner-firefox-beta-PARTNER-stub: stub-installer
+                mozilla-release:
+                    partner-firefox-release-PARTNER-latest: installer
+                    partner-firefox-release-PARTNER-stub: stub-installer
+                default: {}
         shipping-product: firefox
         treeherder:
             platform: firefox-release/opt
--- a/taskcluster/taskgraph/transforms/bouncer_aliases.py
+++ b/taskcluster/taskgraph/transforms/bouncer_aliases.py
@@ -6,16 +6,18 @@ Add from parameters.yml into bouncer sub
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import logging
 
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.transforms.bouncer_submission import craft_bouncer_product_name
+from taskgraph.transforms.bouncer_submission_partners import craft_partner_bouncer_product_name
+from taskgraph.util.partners import get_partners_to_be_published
 from taskgraph.util.schema import resolve_keyed_by
 from taskgraph.util.scriptworker import get_release_config
 
 logger = logging.getLogger(__name__)
 
 transforms = TransformSequence()
 
 
@@ -29,33 +31,53 @@ def make_task_worker(config, jobs):
         resolve_keyed_by(
             job, 'scopes', item_name=job['name'],
             **{'release-level': config.params.release_level()}
         )
         resolve_keyed_by(
             job, 'bouncer-products-per-alias',
             item_name=job['name'], project=config.params['project']
         )
+        if 'partner-bouncer-products-per-alias' in job:
+            resolve_keyed_by(
+                job, 'partner-bouncer-products-per-alias',
+                item_name=job['name'], project=config.params['project']
+            )
 
         job['worker']['entries'] = craft_bouncer_entries(config, job)
 
         del job['bouncer-products-per-alias']
+        if 'partner-bouncer-products-per-alias' in job:
+            del job['partner-bouncer-products-per-alias']
 
         if job['worker']['entries']:
             yield job
         else:
             logger.warn('No bouncer entries defined in bouncer submission task for "{}". \
 Job deleted.'.format(job['name']))
 
 
 def craft_bouncer_entries(config, job):
     release_config = get_release_config(config)
 
     product = job['shipping-product']
     current_version = release_config['version']
     bouncer_products_per_alias = job['bouncer-products-per-alias']
 
-    return {
+    entries = {
         bouncer_alias: craft_bouncer_product_name(
             product, bouncer_product, current_version,
         )
         for bouncer_alias, bouncer_product in bouncer_products_per_alias.items()
     }
+
+    partner_bouncer_products_per_alias = job.get('partner-bouncer-products-per-alias')
+    if partner_bouncer_products_per_alias:
+        partners = get_partners_to_be_published(config)
+        for partner, sub_config_name, _ in partners:
+            entries.update({
+                bouncer_alias.replace('PARTNER', '{}-{}'.format(partner, sub_config_name)):
+                    craft_partner_bouncer_product_name(
+                        product, bouncer_product, current_version, partner, sub_config_name)
+                for bouncer_alias, bouncer_product in partner_bouncer_products_per_alias.items()
+            })
+
+    return entries