Bug 1382849 - Add workspace cache to toolchain docker-worker jobs. r?dustin
--- 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'],