From 768651a65db8a6ef29b55f83f95ef1d05714c8f1 Mon Sep 17 00:00:00 2001
From: Gabriel Bustamante <gbustamante@mozilla.com>
Date: Thu, 11 Aug 2022 17:36:26 +0000
Subject: [PATCH] Bug 1752111 - Make l10n bumper run on autoland instead of
 mozilla-central r=aki

Differential Revision: https://phabricator.services.mozilla.com/D154305
---
 .cron.yml                                     |  6 +-
 taskcluster/ci/l10n-bump/kind.yml             | 86 +++++++++++--------
 .../transforms/release_version_bump.py        |  2 +-
 3 files changed, 53 insertions(+), 41 deletions(-)

diff --git a/.cron.yml b/.cron.yml
index 33e1af2c4f1d4..04422d22c7890 100644
--- a/.cron.yml
+++ b/.cron.yml
@@ -29,8 +29,6 @@ jobs:
           - mozilla-central
       when:
           by-project:
-              # `l10n-bumper` job should have enough time to finish before this
-              # job runs
               mozilla-central: [{hour: 10, minute: 0}, {hour: 22, minute: 0}]
               # No default
 
@@ -277,12 +275,14 @@ jobs:
           treeherder-symbol: l10n-bump
           target-tasks-method: l10n_bump
       run-on-projects:
+          - autoland
           - mozilla-central
           - mozilla-beta
       when:
           by-project:
               # 3h15m before launch of `nightly-desktop`
-              mozilla-central: [{hour: 6, minute: 45}, {hour: 18, minute: 45}]
+              autoland: [{hour: 6, minute: 45}, {hour: 18, minute: 45}]
+              mozilla-central: []
               # 3h15m before launch of `daily-releases`
               mozilla-beta: [{hour: 18, minute: 45}]
               # No default
diff --git a/taskcluster/ci/l10n-bump/kind.yml b/taskcluster/ci/l10n-bump/kind.yml
index 396e1ee51e9ed..2dd21e40689d4 100644
--- a/taskcluster/ci/l10n-bump/kind.yml
+++ b/taskcluster/ci/l10n-bump/kind.yml
@@ -8,7 +8,6 @@ transforms:
     - gecko_taskgraph.transforms.release_version_bump:transforms
     - gecko_taskgraph.transforms.task:transforms
 
-
 job-defaults:
     worker-type: tree
     worker:
@@ -19,15 +18,20 @@ job-defaults:
             by-project:
                 mozilla-beta: false
                 default: true
-        ignore-closed-tree: false
+        ignore-closed-tree:
+            by-project:
+                autoland: true
+                default: false
         push:
             by-project:
                 mozilla-(central|beta): true
+                autoland: true
                 default: false
         source-repo:
             by-release-type:
                 beta: https://hg.mozilla.org/releases/mozilla-beta
-                default: https://hg.mozilla.org/mozilla-central
+                nightly: https://hg.mozilla.org/mozilla-central
+                default: https://hg.mozilla.org/integration/autoland
         l10n-bump-info:
             by-release-type:
                 # XXX whenever the `beta` config changes, make sure to make
@@ -52,23 +56,27 @@ job-defaults:
                             - win64-devedition
                             - win64-aarch64
                             - win64-aarch64-devedition
-                    platform-configs: [{
-                        "platforms": [
-                            "linux",
-                            "linux-devedition",
-                            "linux64",
-                            "linux64-devedition",
-                            "macosx64",
-                            "macosx64-devedition",
-                            "win32",
-                            "win32-devedition",
-                            "win64",
-                            "win64-devedition",
-                            "win64-aarch64",
-                            "win64-aarch64-devedition",
-                        ],
-                        "path": "browser/locales/shipped-locales",
-                    }]
+                    platform-configs:
+                        [
+                            {
+                                "platforms":
+                                    [
+                                        "linux",
+                                        "linux-devedition",
+                                        "linux64",
+                                        "linux64-devedition",
+                                        "macosx64",
+                                        "macosx64-devedition",
+                                        "win32",
+                                        "win32-devedition",
+                                        "win64",
+                                        "win64-devedition",
+                                        "win64-aarch64",
+                                        "win64-aarch64-devedition",
+                                    ],
+                                "path": "browser/locales/shipped-locales",
+                            },
+                        ]
                 default:
                     name: Firefox l10n changesets
                     path: browser/locales/l10n-changesets.json
@@ -89,23 +97,27 @@ job-defaults:
                             - win64-devedition
                             - win64-aarch64
                             - win64-aarch64-devedition
-                    platform-configs: [{
-                        "platforms": [
-                            "linux",
-                            "linux-devedition",
-                            "linux64",
-                            "linux64-devedition",
-                            "macosx64",
-                            "macosx64-devedition",
-                            "win32",
-                            "win32-devedition",
-                            "win64",
-                            "win64-devedition",
-                            "win64-aarch64",
-                            "win64-aarch64-devedition",
-                        ],
-                        "path": "browser/locales/all-locales",
-                    }]
+                    platform-configs:
+                        [
+                            {
+                                "platforms":
+                                    [
+                                        "linux",
+                                        "linux-devedition",
+                                        "linux64",
+                                        "linux64-devedition",
+                                        "macosx64",
+                                        "macosx64-devedition",
+                                        "win32",
+                                        "win32-devedition",
+                                        "win64",
+                                        "win64-devedition",
+                                        "win64-aarch64",
+                                        "win64-aarch64-devedition",
+                                    ],
+                                "path": "browser/locales/all-locales",
+                            },
+                        ]
 
 jobs:
     l10n-bumper:
diff --git a/taskcluster/gecko_taskgraph/transforms/release_version_bump.py b/taskcluster/gecko_taskgraph/transforms/release_version_bump.py
index 40bcd237cf8f3..b0c31a47a5ae7 100644
--- a/taskcluster/gecko_taskgraph/transforms/release_version_bump.py
+++ b/taskcluster/gecko_taskgraph/transforms/release_version_bump.py
@@ -21,7 +21,7 @@ def handle_keyed_by(config, tasks):
     ]
     for task in tasks:
         fields = default_fields[:]
-        for additional_field in ("l10n-bump-info", "source-repo", "dontbuild"):
+        for additional_field in ("l10n-bump-info", "source-repo", "dontbuild", "ignore-closed-tree"):
             if additional_field in task["worker"]:
                 fields.append(f"worker.{additional_field}")
         for field in fields:
-- 
GitLab