From 88ded8d0627983dc86e3d78845b0710149f0312c Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 21 Jul 2017 06:55:06 +0900 Subject: [PATCH] Bug 1382849 - Add workspace cache to toolchain docker-worker jobs. r=dustin,gps --HG-- extra : rebase_source : 79cfd065ff767b78ec81e02afd021dceb6c89e52 --- taskcluster/ci/toolchain/kind.yml | 1 + taskcluster/taskgraph/transforms/build_attrs.py | 6 +++++- taskcluster/taskgraph/transforms/job/toolchain.py | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/taskcluster/ci/toolchain/kind.yml b/taskcluster/ci/toolchain/kind.yml index 23f5290fb6fe..143f22aec35b 100644 --- a/taskcluster/ci/toolchain/kind.yml +++ b/taskcluster/ci/toolchain/kind.yml @@ -6,6 +6,7 @@ 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 diff --git a/taskcluster/taskgraph/transforms/build_attrs.py b/taskcluster/taskgraph/transforms/build_attrs.py index 56c0076148b0..4781231f259f 100644 --- a/taskcluster/taskgraph/transforms/build_attrs.py +++ b/taskcluster/taskgraph/transforms/build_attrs.py @@ -17,7 +17,11 @@ def set_build_attributes(config, jobs): 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': diff --git a/taskcluster/taskgraph/transforms/job/toolchain.py b/taskcluster/taskgraph/transforms/job/toolchain.py index bc48c29ca223..1bdfaff8d29d 100644 --- a/taskcluster/taskgraph/transforms/job/toolchain.py +++ b/taskcluster/taskgraph/transforms/job/toolchain.py @@ -14,6 +14,7 @@ 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 @@ -86,6 +87,7 @@ def docker_worker_toolchain(config, job, taskdesc): '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)