Bug 1391476 - Don't use ~ in paths; r?dustin draft
authorGregory Szorc <gps@mozilla.com>
Mon, 21 Aug 2017 17:11:49 -0700
changeset 651404 8775a6b4512196dfb0fdd116eb51e74dd9f96018
parent 651403 2424c0d50d0e28b95d545a0606b99e2de09baf0d
child 651405 7fffb68dbea357488558dc329e44bf36064da14f
push id75721
push usergszorc@mozilla.com
push dateWed, 23 Aug 2017 17:48:59 +0000
reviewersdustin
bugs1391476
milestone57.0a1
Bug 1391476 - Don't use ~ in paths; r?dustin ~ in paths is mostly a shell-ism. Let's not use it. The real reason for this is it interfes with upcoming commits that audit cache and volume paths. MozReview-Commit-ID: AhjMwg5gexx
taskcluster/taskgraph/transforms/job/common.py
taskcluster/taskgraph/transforms/job/mach.py
taskcluster/taskgraph/transforms/job/run_task.py
--- a/taskcluster/taskgraph/transforms/job/common.py
+++ b/taskcluster/taskgraph/transforms/job/common.py
@@ -90,17 +90,17 @@ def support_vcs_checkout(config, job, ta
             'name': 'level-%s-checkouts' % level,
             'mount-point': '/home/worker/checkouts',
         })
 
     taskdesc['worker'].setdefault('env', {}).update({
         'GECKO_BASE_REPOSITORY': config.params['base_repository'],
         'GECKO_HEAD_REPOSITORY': config.params['head_repository'],
         'GECKO_HEAD_REV': config.params['head_rev'],
-        'HG_STORE_PATH': '~/checkouts/hg-store',
+        'HG_STORE_PATH': '/home/worker/checkouts/hg-store',
     })
 
     # Give task access to hgfingerprint secret so it can pin the certificate
     # for hg.mozilla.org.
     taskdesc['scopes'].append('secrets:get:project/taskcluster/gecko/hgfingerprint')
 
     # only some worker platforms have taskcluster-proxy enabled
     if job['worker']['implementation'] in ('docker-worker', 'docker-engine'):
--- a/taskcluster/taskgraph/transforms/job/mach.py
+++ b/taskcluster/taskgraph/transforms/job/mach.py
@@ -24,15 +24,15 @@ mach_schema = Schema({
 
 
 @run_job_using("docker-worker", "mach", schema=mach_schema)
 @run_job_using("native-engine", "mach", schema=mach_schema)
 def docker_worker_mach(config, job, taskdesc):
     run = job['run']
 
     # defer to the run_task implementation
-    run['command'] = 'cd ~/checkouts/gecko && ./mach ' + run['mach']
+    run['command'] = 'cd /home/worker/checkouts/gecko && ./mach ' + run['mach']
     run['checkout'] = True
     del run['mach']
     if job['worker']['implementation'] == 'docker-worker':
         docker_worker_run_task(config, job, taskdesc)
     else:
         native_engine_run_task(config, job, taskdesc)
--- a/taskcluster/taskgraph/transforms/job/run_task.py
+++ b/taskcluster/taskgraph/transforms/job/run_task.py
@@ -50,17 +50,17 @@ def docker_worker_run_task(config, job, 
             'mount-point': '/home/worker/.cache',
         })
 
     run_command = run['command']
     if isinstance(run_command, basestring):
         run_command = ['bash', '-cx', run_command]
     command = ['/home/worker/bin/run-task']
     if run['checkout']:
-        command.append('--vcs-checkout=~/checkouts/gecko')
+        command.append('--vcs-checkout=/home/worker/checkouts/gecko')
     command.append('--fetch-hgfingerprint')
     command.append('--')
     command.extend(run_command)
     worker['command'] = command
 
 
 @run_job_using("native-engine", "run-task", schema=run_task_schema)
 def native_engine_run_task(config, job, taskdesc):
@@ -75,12 +75,12 @@ def native_engine_run_task(config, job, 
     if run.get('cache-dotcache'):
         raise Exception("No cache support on native-worker; can't use cache-dotcache")
 
     run_command = run['command']
     if isinstance(run_command, basestring):
         run_command = ['bash', '-cx', run_command]
     command = ['./run-task']
     if run['checkout']:
-        command.append('--vcs-checkout=~/checkouts/gecko')
+        command.append('--vcs-checkout=/home/worker/checkouts/gecko')
     command.append('--')
     command.extend(run_command)
     worker['command'] = command