Bug 1381577 - Part U; 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 613363 9a8919eb2274e808aa61a6b5f0f0e8d8230cfd2b
parent 613362 45f61200a794f465637da657c0fa6e936a81bc09
child 613364 a9236c910f5c60b4c11d9c9ff7491b42b4d6b98b
push id69770
push userCallek@gmail.com
push dateFri, 21 Jul 2017 20:09:14 +0000
reviewerskmoir
bugs1381577
milestone56.0a1
Bug 1381577 - Part U; 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,120 @@ 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']
    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
          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 +135,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",
@@ -326,60 +332,72 @@ 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,
+            }
+            job_description['run']['use-simple-package'] = False
+            job_description['run']['use-magic-mh-args'] = False
+        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'),
             }