diff --git a/taskcluster/ci/release-eme-free-repack/kind.yml b/taskcluster/ci/release-eme-free-repack/kind.yml index ef38ab4a409c..e84be109488c 100644 --- a/taskcluster/ci/release-eme-free-repack/kind.yml +++ b/taskcluster/ci/release-eme-free-repack/kind.yml @@ -41,6 +41,13 @@ job-defaults: job-script: taskcluster/scripts/builder/repackage.sh need-xvfb: false tooltool-downloads: false + extra: + limit-locales: + by-project: + birch: true + jamun: true + maple: true + default: false jobs: macosx64-nightly: diff --git a/taskcluster/ci/release-partner-repack/kind.yml b/taskcluster/ci/release-partner-repack/kind.yml index 492fbb800f7b..72b65e4ab7f1 100644 --- a/taskcluster/ci/release-partner-repack/kind.yml +++ b/taskcluster/ci/release-partner-repack/kind.yml @@ -41,6 +41,13 @@ job-defaults: job-script: taskcluster/scripts/builder/repackage.sh need-xvfb: false tooltool-downloads: false + extra: + limit-locales: + by-project: + birch: true + jamun: true + maple: true + default: false jobs: linux-nightly: diff --git a/taskcluster/taskgraph/transforms/partner_repack.py b/taskcluster/taskgraph/transforms/partner_repack.py index c3b2fb26f22f..17b76d3bdeb8 100644 --- a/taskcluster/taskgraph/transforms/partner_repack.py +++ b/taskcluster/taskgraph/transforms/partner_repack.py @@ -23,6 +23,10 @@ def resolve_properties(config, tasks): property = "worker.env.{}".format(property) resolve_keyed_by(task, property, property, **config.params) + for property in ("limit-locales", ): + property = "extra.{}".format(property) + resolve_keyed_by(task, property, property, **config.params) + if task['worker']['env']['REPACK_MANIFESTS_URL'].startswith('git@'): task.setdefault('scopes', []).append( 'secrets:get:project/releng/gecko/build/level-{level}/partner-github-ssh'.format( @@ -43,6 +47,11 @@ def make_label(config, tasks): @transforms.add def add_command_arguments(config, tasks): release_config = get_release_config(config) + all_locales = set() + for partner_class in config.params['release_partner_config'].values(): + for partner in partner_class.values(): + for sub_partner in partner.values(): + all_locales.update(sub_partner.get('locales', [])) for task in tasks: # add the MOZHARNESS_OPTIONS, eg version=61.0, build-number=1, platform=win64 task['run']['options'] = [ @@ -50,6 +59,9 @@ def add_command_arguments(config, tasks): 'build-number={}'.format(release_config['build_number']), 'platform={}'.format(task['attributes']['build_platform'].split('-')[0]), ] + if task['extra']['limit-locales']: + for locale in all_locales: + task['run']['options'].append('limit-locale={}'.format(locale)) # The upstream taskIds are stored a special environment variable, because we want to use # task-reference's to resolve dependencies, but the string handling of MOZHARNESS_OPTIONS diff --git a/testing/mozharness/scripts/desktop_partner_repacks.py b/testing/mozharness/scripts/desktop_partner_repacks.py index 482bce5dce35..e12c5a060c2a 100755 --- a/testing/mozharness/scripts/desktop_partner_repacks.py +++ b/testing/mozharness/scripts/desktop_partner_repacks.py @@ -56,6 +56,10 @@ class DesktopPartnerRepacks(ReleaseMixin, BuildbotMixin, PurgeMixin, "action": "extend", "help": "taskId(s) of upstream tasks for vanilla Firefox artifacts", }], + [["--limit-locale", "-l"], { + "dest": "limitLocales", + "action": "append", + }], ] def __init__(self): @@ -162,6 +166,9 @@ class DesktopPartnerRepacks(ReleaseMixin, BuildbotMixin, PurgeMixin, if self.config.get('taskIds'): for taskId in self.config['taskIds']: repack_cmd.extend(["--taskid", taskId]) + if self.config.get("limitLocales"): + for locale in self.config["limitLocales"]: + repack_cmd.extend(["--limit-locale", locale]) return self.run_command(repack_cmd, cwd=self.query_abs_dirs()['abs_scripts_dir'])