Bug 1426776 - Don't setup dotcache cache when not requested. r?dustin
--- a/taskcluster/taskgraph/transforms/job/run_task.py
+++ b/taskcluster/taskgraph/transforms/job/run_task.py
@@ -58,22 +58,23 @@ def add_checkout_to_command(run, command
@run_job_using("docker-worker", "run-task", schema=run_task_schema)
def docker_worker_run_task(config, job, taskdesc):
run = job['run']
worker = taskdesc['worker'] = job['worker']
common_setup(config, job, taskdesc)
- worker['caches'].append({
- 'type': 'persistent',
- 'name': 'level-{level}-{project}-dotcache'.format(**config.params),
- 'mount-point': '/builds/worker/.cache',
- 'skip-untrusted': True,
- })
+ if run.get('cache-dotcache'):
+ worker['caches'].append({
+ 'type': 'persistent',
+ 'name': 'level-{level}-{project}-dotcache'.format(**config.params),
+ 'mount-point': '/builds/worker/.cache',
+ 'skip-untrusted': True,
+ })
run_command = run['command']
if isinstance(run_command, basestring):
run_command = ['bash', '-cx', run_command]
command = ['/builds/worker/bin/run-task']
add_checkout_to_command(run, command)
if run['comm-checkout']:
command.append('--comm-checkout=/builds/worker/checkouts/gecko/comm')