Bug 1382849 - Add workspace cache to toolchain docker-worker jobs. r=dustin,gps
☠☠ backed out by b1e444b1b4c7 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 21 Jul 2017 06:55:06 +0900
changeset 418786 0ee08a9803fc13145128cfa0625a63bd464ccd32
parent 418785 942cdcab7f794b27ee1537670971a296f3bacdbd
child 418787 47ebbbac4f990cca0dd681d18ff9be77bbb2fdca
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin, gps
bugs1382849
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1382849 - Add workspace cache to toolchain docker-worker jobs. r=dustin,gps
taskcluster/ci/toolchain/kind.yml
taskcluster/taskgraph/transforms/build_attrs.py
taskcluster/taskgraph/transforms/job/toolchain.py
--- a/taskcluster/ci/toolchain/kind.yml
+++ b/taskcluster/ci/toolchain/kind.yml
@@ -1,16 +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.transform:loader
 
 transforms:
    - taskgraph.transforms.try_job:transforms
+   - taskgraph.transforms.build_attrs:transforms
    - taskgraph.transforms.toolchain:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.task:transforms
 
 jobs-from:
    - linux.yml
    - macosx.yml
    - windows.yml
--- a/taskcluster/taskgraph/transforms/build_attrs.py
+++ b/taskcluster/taskgraph/transforms/build_attrs.py
@@ -12,17 +12,21 @@ transforms = TransformSequence()
 def set_build_attributes(config, jobs):
     """
     Set the build_platform and build_type attributes based on the job name.
     Although not all jobs using this transform are actual "builds", the try
     option syntax treats them as such, and this arranges the attributes
     appropriately for that purpose.
     """
     for job in jobs:
-        build_platform, build_type = job['name'].split('/')
+        if '/' in job['name']:
+            build_platform, build_type = job['name'].split('/')
+        else:
+            build_platform = job['name']
+            build_type = 'opt'
 
         # pgo builds are represented as a different platform, type opt
         if build_type == 'pgo':
             build_platform = build_platform + '-pgo'
             build_type = 'opt'
 
         attributes = job.setdefault('attributes', {})
         attributes.update({
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -9,16 +9,17 @@ from __future__ import absolute_import, 
 
 from taskgraph.util.schema import Schema
 from voluptuous import Optional, Required, Any
 
 from taskgraph.transforms.job import run_job_using
 from taskgraph.transforms.job.common import (
     docker_worker_add_tc_vcs_cache,
     docker_worker_add_gecko_vcs_env_vars,
+    docker_worker_add_workspace_cache,
     support_vcs_checkout,
 )
 from taskgraph.util.hash import hash_paths
 from taskgraph import GECKO
 
 
 TOOLCHAIN_INDEX = 'gecko.cache.level-{level}.toolchains.v1.{name}.{digest}'
 
@@ -81,16 +82,17 @@ def docker_worker_toolchain(config, job,
     worker['caches'] = []
 
     worker['artifacts'].append({
         'name': 'public',
         'path': '/home/worker/workspace/artifacts/',
         'type': 'directory',
     })
 
+    docker_worker_add_workspace_cache(config, job, taskdesc)
     docker_worker_add_tc_vcs_cache(config, job, taskdesc)
     docker_worker_add_gecko_vcs_env_vars(config, job, taskdesc)
     support_vcs_checkout(config, job, taskdesc)
 
     env = worker['env']
     env.update({
         'MOZ_BUILD_DATE': config.params['moz_build_date'],
         'MOZ_SCM_LEVEL': config.params['level'],