Bug 1381577 - Add tc win l10n to the taskgraph, and don't try to sign it yet. r=kmoir draft
authorJustin Wood <Callek@gmail.com>
Tue, 18 Jul 2017 14:22:15 -0400
changeset 611735 f582ad4e11e93cb3ef331dd671fa3b30572996a5
parent 611734 562292de496d1d8f2edf034e19d91c4fb70d6c82
child 611736 6dbe6b8a05640930a5ba1103b89898ae3e7a9e64
push id69287
push userCallek@gmail.com
push dateThu, 20 Jul 2017 01:11:37 +0000
reviewerskmoir
bugs1381577
milestone56.0a1
Bug 1381577 - Add tc win l10n to the taskgraph, and don't try to sign it yet. r=kmoir Land date changes to support windows nightlies onto central MozReview-Commit-ID: EK4JQI4Rqgo
taskcluster/ci/nightly-l10n-signing/kind.yml
taskcluster/ci/nightly-l10n/kind.yml
taskcluster/taskgraph/transforms/l10n.py
--- a/taskcluster/ci/nightly-l10n-signing/kind.yml
+++ b/taskcluster/ci/nightly-l10n-signing/kind.yml
@@ -9,8 +9,12 @@ transforms:
    - taskgraph.transforms.signing:transforms
    - taskgraph.transforms.task:transforms
 
 kind-dependencies:
   - nightly-l10n
 
 only-for-attributes:
   - nightly
+
+not-for-build-platforms:
+   - win32-nightly/opt
+   - win64-nightly/opt
--- a/taskcluster/ci/nightly-l10n/kind.yml
+++ b/taskcluster/ci/nightly-l10n/kind.yml
@@ -12,104 +12,121 @@ transforms:
 kind-dependencies:
    - build
 
 only-for-build-platforms:
    - linux64-nightly/opt
    - linux-nightly/opt
    - android-api-15-nightly/opt
    - macosx64-nightly/opt
+   - win32-nightly/opt
+   - win64-nightly/opt
 
 job-template:
    description:
       by-build-platform:
          default: Localization
          android-api-15-nightly: Single Locale Repack
    locales-file:
       by-build-platform:
          default: browser/locales/all-locales
          android-api-15-nightly: mobile/locales/l10n-changesets.json
    chunks:
       by-build-platform:
          macosx64-nightly: 8
+         win.*: 10
          default: 6
    run-on-projects: ['mozilla-central', 'mozilla-beta', 'date']
    ignore-locales:
       by-build-platform:
          # OSX has a special locale for japanese
          macosx64.*: [ja]
          default: [ja-JP-mac]
    run-time:
       by-build-platform:
          default: 36000
          android-api-15-nightly: 18000
    tooltool:
       by-build-platform:
          default: public
          android-api-15-nightly: internal
          macosx64-nightly: internal
+         win32-nightly: internal
+         win64-nightly: internal
    index:
       type: l10n
       product:
          by-build-platform:
             default: firefox
             android-api-15-nightly: mobile
       job-name:
          by-build-platform:
             linux-nightly: linux-opt
             linux64-nightly: linux64-opt
             macosx64-nightly: macosx64-opt
+            win32-nightly: win32-opt
+            win64-nightly: win64-opt
             android-api-15-nightly: android-api-15-opt
    worker-type:
       by-build-platform:
          default: aws-provisioner-v1/gecko-{level}-b-linux
          android-api-15-nightly: aws-provisioner-v1/gecko-{level}-b-android
+         win.*: aws-provisioner-v1/gecko-{level}-b-win2012
    treeherder:
       symbol: tc-L10n(N)
-      tier:
-         by-build-platform:
-            linux.*: 1
-            android.*: 1
-            default: 2
+      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
             android-api-15-nightly: android-4-0-armv7-api15/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/<unsigned-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/<unsigned-build>/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
+            NO_MAGIC_MH_BUILD_ARGS: "1"
          android-api-15-nightly:
             EN_US_PACKAGE_NAME: target.apk
             EN_US_BINARY_URL:
                task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/en-US
    mozharness:
       config:
          by-build-platform:
             linux-nightly:
                - single_locale/tc_linux32.py
                - taskcluster_nightly.py
             linux64-nightly:
                - single_locale/tc_linux64.py
                - taskcluster_nightly.py
             macosx64-nightly:
                - single_locale/tc_macosx64.py
                - taskcluster_nightly.py
+            win32-nightly: []
+            win64-nightly: []
             android-api-15-nightly:
                - taskcluster_nightly.py
                - single_locale/{project}_android-api-15.py
                - single_locale/tc_android-api-15.py
             # no default, so we fail on new entries
       options:
          by-build-platform:
             linux-nightly:
@@ -119,19 +136,31 @@ job-template:
             linux64-nightly:
                - environment-config=single_locale/production.py
                - branch-config=single_locale/{project}.py
                - platform-config=single_locale/linux64.py
             macosx64-nightly:
                - environment-config=single_locale/production.py
                - branch-config=single_locale/{project}.py
                - platform-config=single_locale/macosx64.py
+            win32-nightly:
+               - environment-config=single_locale/production.py
+               - branch-config=single_locale/{project}.py
+               - platform-config=single_locale/win32.py
+               - config=single_locale/tc_win32.py
+               - config=taskcluster_nightly.py
+            win64-nightly:
+               - environment-config=single_locale/production.py
+               - branch-config=single_locale/{project}.py
+               - platform-config=single_locale/win64.py
+               - config=single_locale/tc_win64.py
+               - config=taskcluster_nightly.py
             default: [ ]
       actions:
          by-build-platform:
-            default: [clone-locales list-locales setup repack
-                      submit-to-balrog summary]
-            android-api-15-nightly: [clone-locales list-locales setup repack
-                                     upload-repacks submit-to-balrog summary]
+            default: ['clone-locales', 'list-locales', 'setup', 'repack',
+                      'submit-to-balrog', 'summary']
+            android-api-15-nightly: ['clone-locales', 'list-locales', 'setup', 'repack',
+                                     'upload-repacks', 'submit-to-balrog', 'summary']
       script:
          by-build-platform:
             default: mozharness/scripts/desktop_l10n.py
             android-api-15-nightly: mozharness/scripts/mobile_l10n.py
--- a/taskcluster/taskgraph/transforms/l10n.py
+++ b/taskcluster/taskgraph/transforms/l10n.py
@@ -210,16 +210,22 @@ def validate_early(config, jobs):
 @transforms.add
 def setup_nightly_dependency(config, jobs):
     """ Sets up a task dependency to the signing job this relates to """
     for job in jobs:
         if not job['attributes'].get('nightly'):
             yield job
             continue  # do not add a dep unless we're a nightly
         job['dependencies'] = {'unsigned-build': job['dependent-task'].label}
+        if job['attributes']['build_platform'].startswith('win'):
+            # Weave these in and just assume they will be there in the resulting graph
+            job['dependencies'].update({
+                'signed-build': 'signing-{}'.format(job['name']),
+                'repackage-signed': 'repackage-signing-repackage-{}'.format(job['name'])
+            })
         yield job
 
 
 @transforms.add
 def handle_keyed_by(config, jobs):
     """Resolve fields that can be keyed by platform, etc."""
     fields = [
         "locales-file",
@@ -243,16 +249,24 @@ def handle_keyed_by(config, jobs):
     for job in jobs:
         job = copy.deepcopy(job)  # don't overwrite dict values here
         for field in fields:
             resolve_keyed_by(item=job, field=field, item_name=job['name'])
         yield job
 
 
 @transforms.add
+def disable_simple_package(config, jobs):
+    for job in jobs:
+        if job['attributes']['build_platform'].startswith('win'):
+            job['env'].update({'DISABLE_SIMPLE_PACKAGE': "1"})
+        yield job
+
+
+@transforms.add
 def all_locales_attribute(config, jobs):
     for job in jobs:
         locales_with_changesets = _parse_locales_file(job["locales-file"])
         locales_with_changesets = _remove_locales(locales_with_changesets,
                                                   to_remove=job['ignore-locales'])
 
         locales = sorted(locales_with_changesets.keys())
         attributes = job.setdefault('attributes', {})
@@ -326,60 +340,70 @@ def mh_options_replace_project(config, j
             )
         yield job
 
 
 @transforms.add
 def chain_of_trust(config, jobs):
     for job in jobs:
         # add the docker image to the chain of trust inputs in task.extra
-        cot = job.setdefault('extra', {}).setdefault('chainOfTrust', {})
-        cot.setdefault('inputs', {})['docker-image'] = {"task-reference": "<docker-image>"}
+        if not job['worker-type'].endswith("-b-win2012"):
+            cot = job.setdefault('extra', {}).setdefault('chainOfTrust', {})
+            cot.setdefault('inputs', {})['docker-image'] = {"task-reference": "<docker-image>"}
         yield job
 
 
 @transforms.add
 def validate_again(config, jobs):
     for job in jobs:
         yield validate_schema(l10n_description_schema, job,
                               "In job {!r}:".format(job.get('name', 'unknown')))
 
 
 @transforms.add
 def make_job_description(config, jobs):
     for job in jobs:
         job_description = {
             'name': job['name'],
-            'worker': {
-                'docker-image': {'in-tree': 'desktop-build'},
-                'max-run-time': job['run-time'],
-                'chain-of-trust': True,
-            },
-            'extra': job['extra'],
             'worker-type': job['worker-type'],
             'description': job['description'],
             'run': {
                 'using': 'mozharness',
                 'job-script': 'taskcluster/scripts/builder/build-l10n.sh',
                 'config': job['mozharness']['config'],
                 'script': job['mozharness']['script'],
                 'actions': job['mozharness']['actions'],
                 'options': job['mozharness']['options'],
-                'tooltool-downloads': job['tooltool'],
-                'need-xvfb': True,
             },
             'attributes': job['attributes'],
             'treeherder': {
                 'kind': 'build',
                 'tier': job['treeherder']['tier'],
                 'symbol': job['treeherder']['symbol'],
                 'platform': job['treeherder']['platform'],
             },
             'run-on-projects': job.get('run-on-projects') if job.get('run-on-projects') else [],
         }
+        if job.get('extra'):
+            job_description['extra'] = job['extra']
+
+        if job['worker-type'].endswith("-b-win2012"):
+            job_description['worker'] = {
+                'os': 'windows',
+                'max-run-time': 7200,
+                'chain-of-trust': True,
+            }
+        else:
+            job_description['worker'] = {
+                'docker-image': {'in-tree': 'desktop-build'},
+                'max-run-time': job['run-time'],
+                'chain-of-trust': True,
+            }
+            job_description['run']['tooltool-downloads'] = job['tooltool']
+            job_description['run']['need-xvfb'] = True
 
         if job.get('index'):
             job_description['index'] = {
                 'product': job['index']['product'],
                 'job-name': job['index']['job-name'],
                 'type': job['index'].get('type', 'generic'),
             }