Bug 1439265: Add L10N and repackage tasks; r?Fallen draft
authorTom Prince <mozilla@hocat.ca>
Thu, 11 Jan 2018 22:41:15 -0700
changeset 59228 2bf0a4cab29bc8513cc011d48e0db42e369f1eca
parent 59227 1992917315f23f7370959133bc91030cc520fedc
child 59229 3351b73180624fb7ed16443e67faafd5a7e342f7
push id5930
push usermozilla@hocat.ca
push dateTue, 20 Feb 2018 19:31:34 +0000
treeherdertry-comm-central@3ba393bc44ce [default view] [failures only]
reviewersFallen
bugs1439265
Bug 1439265: Add L10N and repackage tasks; r?Fallen Differential Revision: https://phabricator.services.mozilla.com/D610
mozharness/builds/branch_specifics.py
mozharness/repackage/thunderbird_win.py
mozharness/single_locale/thunderbird.py
mozharness/single_locale/try-comm-central.py
taskcluster/ci/config.yml
taskcluster/ci/nightly-l10n-signing/kind.yml
taskcluster/ci/nightly-l10n/kind.yml
taskcluster/ci/repackage-l10n/kind.yml
taskcluster/ci/repackage-signing/kind.yml
taskcluster/ci/repackage/kind.yml
new file mode 100644
--- /dev/null
+++ b/mozharness/builds/branch_specifics.py
@@ -0,0 +1,39 @@
+# this is a dict of branch specific keys/values. As this fills up and more
+# fx build factories are ported, we might deal with this differently
+
+# we should be able to port this in-tree and have the respective repos and
+# revisions handle what goes on in here. Tracking: bug 978510
+
+# example config and explanation of how it works:
+# config = {
+#     # if a branch matches a key below, override items in self.config with
+#     # items in the key's value.
+#     # this override can be done for every platform or at a platform level
+#     '<branch-name>': {
+#         # global config items (applies to all platforms and build types)
+#         'repo_path': "projects/<branch-name>",
+#
+#         # platform config items (applies to specific platforms)
+#         'platform_overrides': {
+#             # if a platform matches a key below, override items in
+#             # self.config with items in the key's value
+#             'linux64-debug': {
+#                 'upload_symbols': False,
+#             },
+#             'win64': {
+#                 'enable_checktests': False,
+#             },
+#         }
+#     },
+# }
+
+config = {
+    "comm-central": {
+        "repo_path": 'comm-central',
+        "update_channel": "nightly",
+    },
+    'try-comm-central': {
+        'repo_path': 'try-comm-central',
+    },
+
+}
new file mode 100644
--- /dev/null
+++ b/mozharness/repackage/thunderbird_win.py
@@ -0,0 +1,23 @@
+import os
+
+config = {
+    "repackage_config": [[
+        "installer",
+        "--package-name", "thunderbird",
+        "--package", "{abs_work_dir}\\inputs\\target.zip",
+        "--tag", "{abs_mozilla_dir}\\comm\\mail\\installer\\windows\\app.tag",
+        "--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
+        "-o", "{output_home}\\target.installer.exe",
+        "--sfx-stub", "comm/other-licenses/7zstub/thunderbird/7zSD.sfx",
+    ], [
+        "mar",
+        "-i", "{abs_work_dir}\\inputs\\target.zip",
+        "--mar", "{abs_work_dir}\\inputs\\mar.exe",
+        "-o", "{output_home}\\target.complete.mar",
+    ]],
+    "download_config": {
+        "target.zip": os.environ.get("SIGNED_ZIP"),
+        "setup.exe": os.environ.get("SIGNED_SETUP"),
+        "mar.exe": os.environ.get("UNSIGNED_MAR"),
+    },
+}
new file mode 100644
--- /dev/null
+++ b/mozharness/single_locale/thunderbird.py
@@ -0,0 +1,8 @@
+config = {
+    # Balrog
+    'appName': 'Thunderbird',
+    # Source path
+    'app_name': 'comm/mail',
+    "locales_file": "src/comm/mail/locales/all-locales",
+    "locales_dir": "comm/mail/locales",
+}
new file mode 100644
--- /dev/null
+++ b/mozharness/single_locale/try-comm-central.py
@@ -0,0 +1,14 @@
+import os
+config = {
+    "app_name": "comm/mail",
+    "nightly_build": False,
+    "branch": "try-comm-central",
+    'is_automation': True,
+
+    "mar_tools_url": os.environ["MAR_TOOLS_URL"],
+    "en_us_binary_url": os.environ["EN_US_BINARY_URL"],
+    "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
+
+    #FIXME
+    "update_channel": "nightly",
+}
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -6,16 +6,19 @@ treeherder:
         'tc-Z': 'MozMill tests executed by TaskCluster'
         'I': 'Docker Image Builds'
         'TL': 'Toolchain builds for Linux 64-bits'
         'TM': 'Toolchain builds for OSX'
         'TMW': 'Toolchain builds for Windows MinGW'
         'TW32': 'Toolchain builds for Windows 32-bits'
         'TW64': 'Toolchain builds for Windows 64-bits'
         'Deb7': 'Packages for Debian 7'
+        'L10n': 'Localised Repacks'
+        'L10n-Rpk': 'Localized Repackaged Repacks'
+        'rs': 'Repackage signing'
 
 index:
     products:
         - thunderbird
 
 try:
     ridealong-builds: {}
 
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/nightly-l10n-signing/kind.yml
@@ -0,0 +1,17 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+loader: taskgraph.loader.single_dep:loader
+
+transforms:
+    - taskgraph.transforms.name_sanity:transforms
+    - taskgraph.transforms.nightly_l10n_signing:transforms
+    - taskgraph.transforms.signing:transforms
+    - taskgraph.transforms.task:transforms
+
+kind-dependencies:
+    - nightly-l10n
+
+only-for-attributes:
+    - nightly
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/nightly-l10n/kind.yml
@@ -0,0 +1,131 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+loader: taskgraph.loader.single_dep:loader
+
+transforms:
+    - taskgraph.transforms.l10n:transforms
+    - taskgraph.transforms.use_toolchains:transforms
+    - taskgraph.transforms.job:transforms
+    - taskgraph.transforms.task:transforms
+
+kind-dependencies:
+    - build
+    - toolchain
+
+only-for-build-platforms:
+    - linux64-nightly/opt
+    - linux-nightly/opt
+    - macosx64-nightly/opt
+    - win32-nightly/opt
+    - win64-nightly/opt
+
+job-template:
+    description: Localization
+    locales-file: comm/mail/locales/all-locales
+    locales-per-chunk: 5
+    run-on-projects: ['release']
+    ignore-locales:
+        by-build-platform:
+            # OSX has a special locale for japanese
+            macosx64.*: [ja]
+            default: [ja-JP-mac]
+    run-time: 36000
+    secrets: false
+    docker-image: null
+    toolchains:
+        by-build-platform:
+            default: []
+            macosx64.*:
+                - linux64-libdmg
+                - linux64-hfsplus
+    tooltool:
+        by-build-platform:
+            default: public
+            macosx64-nightly: internal
+            win32-nightly: internal
+            win64-nightly: internal
+    worker-type:
+        by-build-platform:
+            default: aws-provisioner-v1/gecko-{level}-b-linux
+            win.*: aws-provisioner-v1/gecko-{level}-b-win2012
+    treeherder:
+        symbol: L10n(N)
+        tier: 1
+        platform:
+            by-build-platform:
+                linux64-nightly: linux64/opt
+                linux-nightly: linux32/opt
+                macosx64-nightly: osx-cross/opt
+                win32-nightly: windows2012-32/opt
+                win64-nightly: windows2012-64/opt
+    env:
+        by-build-platform:
+            linux.*:   # linux64 and 32 get same treatment here
+                EN_US_PACKAGE_NAME: target.tar.bz2
+                EN_US_BINARY_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<signed-build>/artifacts/public/build
+                MAR_TOOLS_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/host/bin
+            macosx64-nightly:
+                EN_US_PACKAGE_NAME: target.dmg
+                EN_US_BINARY_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<repackage>/artifacts/public/build
+                MAR_TOOLS_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/host/bin
+            win.*:
+                EN_US_PACKAGE_NAME: target.zip
+                EN_US_BINARY_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<signed-build>/artifacts/public/build
+                EN_US_INSTALLER_BINARY_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<repackage-signed>/artifacts/public/build
+                MAR_TOOLS_URL:
+                    task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/host/bin
+    mozharness:
+        comm-checkout: true
+        config-paths:
+            - comm/mozharness
+        config:
+            # no default, so we fail on new entries
+            by-build-platform:
+                linux-nightly:
+                    - single_locale/linux32.py
+                    - single_locale/{project}.py
+                    - single_locale/tc_common.py
+                    - single_locale/tc_linux32.py
+                    - single_locale/thunderbird.py
+                    - taskcluster_nightly.py
+                linux64-nightly:
+                    - single_locale/linux64.py
+                    - single_locale/{project}.py
+                    - single_locale/tc_common.py
+                    - single_locale/tc_linux64.py
+                    - single_locale/thunderbird.py
+                    - taskcluster_nightly.py
+                macosx64-nightly:
+                    - single_locale/macosx64.py
+                    - single_locale/{project}.py
+                    - single_locale/tc_common.py
+                    - single_locale/tc_macosx64.py
+                    - single_locale/thunderbird.py
+                    - taskcluster_nightly.py
+                win32-nightly:
+                    - single_locale/win32.py
+                    - single_locale/{project}.py
+                    - single_locale/tc_common.py
+                    - single_locale/tc_win32.py
+                    - single_locale/thunderbird.py
+                    - taskcluster_nightly.py
+                win64-nightly:
+                    - single_locale/win64.py
+                    - single_locale/{project}.py
+                    - single_locale/tc_common.py
+                    - single_locale/tc_win64.py
+                    - single_locale/thunderbird.py
+                    - taskcluster_nightly.py
+        options:
+            - revision=$GECKO_HEAD_REV
+        actions: ['clone-locales', 'list-locales', 'setup', 'repack',
+                  'submit-to-balrog', 'summary']
+        script: mozharness/scripts/desktop_l10n.py
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/repackage-l10n/kind.yml
@@ -0,0 +1,44 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+loader: taskgraph.loader.single_dep:loader
+
+transforms:
+    - taskgraph.transforms.repackage_l10n:transforms
+    - taskgraph.transforms.name_sanity:transforms
+    - taskgraph.transforms.repackage:transforms
+    - taskgraph.transforms.use_toolchains:transforms
+    - taskgraph.transforms.job:transforms
+    - taskgraph.transforms.task:transforms
+
+kind-dependencies:
+    - nightly-l10n-signing
+    - toolchain
+
+only-for-build-platforms:
+    - linux-nightly/opt
+    - linux64-nightly/opt
+    - macosx64-nightly/opt
+    - win32-nightly/opt
+    - win64-nightly/opt
+
+job-template:
+    mozharness:
+        comm-checkout: true
+        config-paths:
+            - comm/mozharness
+        config:
+            by-build-platform:
+                linux-.*:
+                    - repackage/linux32_signed.py
+                linux64.*:
+                    - repackage/linux64_signed.py
+                macosx64.*:
+                    - repackage/osx_signed.py
+                win32.*:
+                    - repackage/win32_signed.py
+                    - repackage/thunderbird_win.py
+                win64.*:
+                    - repackage/win64_signed.py
+                    - repackage/thunderbird_win.py
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/repackage-signing/kind.yml
@@ -0,0 +1,21 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+loader: taskgraph.loader.single_dep:loader
+
+transforms:
+    - taskgraph.transforms.name_sanity:transforms
+    - taskgraph.transforms.repackage_signing:transforms
+    - taskgraph.transforms.task:transforms
+
+kind-dependencies:
+    - repackage
+    - repackage-l10n
+
+only-for-build-platforms:
+    - linux-nightly/opt
+    - linux64-nightly/opt
+    - macosx64-nightly/opt
+    - win32-nightly/opt
+    - win64-nightly/opt
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/repackage/kind.yml
@@ -0,0 +1,43 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+loader: taskgraph.loader.single_dep:loader
+
+transforms:
+    - taskgraph.transforms.name_sanity:transforms
+    - taskgraph.transforms.repackage:transforms
+    - taskgraph.transforms.use_toolchains:transforms
+    - taskgraph.transforms.job:transforms
+    - taskgraph.transforms.task:transforms
+
+kind-dependencies:
+    - build-signing
+    - toolchain
+
+only-for-build-platforms:
+    - linux-nightly/opt
+    - linux64-nightly/opt
+    - macosx64-nightly/opt
+    - win32-nightly/opt
+    - win64-nightly/opt
+
+job-template:
+    mozharness:
+        comm-checkout: true
+        config-paths:
+            - comm/mozharness
+        config:
+            by-build-platform:
+                linux-.*:
+                    - repackage/linux32_signed.py
+                linux64.*:
+                    - repackage/linux64_signed.py
+                macosx64.*:
+                    - repackage/osx_signed.py
+                win32.*:
+                    - repackage/win32_signed.py
+                    - repackage/thunderbird_win.py
+                win64.*:
+                    - repackage/win64_signed.py
+                    - repackage/thunderbird_win.py