bug 1442793 - mozharness test artifact_prefix. r?bhearsum draft
authorAki Sasaki <asasaki@mozilla.com>
Wed, 07 Mar 2018 14:32:52 -0800
changeset 782028 8f7059fb60a633fa85364ba66a5e072d3662b80f
parent 782027 d97c0517a40fa9825e84f1c9b0f939eb2999041d
child 782029 f201c4017cf535c6d81430e9ea3a5832e7afe2e7
push id106465
push userasasaki@mozilla.com
push dateSat, 14 Apr 2018 00:42:17 +0000
reviewersbhearsum
bugs1442793
milestone61.0a1
bug 1442793 - mozharness test artifact_prefix. r?bhearsum MozReview-Commit-ID: HuD8rP3db5u
taskcluster/taskgraph/transforms/job/mozharness_test.py
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -3,16 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from voluptuous import Required
 from taskgraph.util.taskcluster import get_artifact_url
 from taskgraph.transforms.job import run_job_using
 from taskgraph.util.schema import Schema
+from taskgraph.util.taskcluster import get_artifact_path
 from taskgraph.transforms.tests import (
     test_description_schema,
     normpath
 )
 from taskgraph.transforms.job.common import (
     docker_worker_add_tooltool,
     support_vcs_checkout,
 )
@@ -81,17 +82,17 @@ test_description_schema = {str(k): v for
 mozharness_test_run_schema = Schema({
     Required('using'): 'mozharness-test',
     Required('test'): test_description_schema,
 })
 
 
 def test_packages_url(taskdesc):
     """Account for different platforms that name their test packages differently"""
-    return get_artifact_url('<build>', 'public/build/target.test_packages.json')
+    return get_artifact_url('<build>', get_artifact_path(taskdesc, 'target.test_packages.json'))
 
 
 @run_job_using('docker-engine', 'mozharness-test', schema=mozharness_test_run_schema)
 @run_job_using('docker-worker', 'mozharness-test', schema=mozharness_test_run_schema)
 def mozharness_test_on_docker(config, job, taskdesc):
     test = taskdesc['run']['test']
     mozharness = test['mozharness']
     worker = taskdesc['worker']
@@ -108,17 +109,17 @@ def mozharness_test_on_docker(config, jo
         # (artifact name prefix, in-image path)
         ("public/logs/", "/builds/worker/workspace/build/upload/logs/"),
         ("public/test", "/builds/worker/artifacts/"),
         ("public/test_info/", "/builds/worker/workspace/build/blobber_upload_dir/"),
     ]
 
     installer_url = get_artifact_url('<build>', mozharness['build-artifact-name'])
     mozharness_url = get_artifact_url('<build>',
-                                      'public/build/mozharness.zip')
+                                      get_artifact_path(taskdesc, 'mozharness.zip'))
 
     worker['artifacts'] = [{
         'name': prefix,
         'path': os.path.join('/builds/worker/workspace', path),
         'type': 'directory',
     } for (prefix, path) in artifacts]
 
     worker['caches'] = [{
@@ -316,17 +317,17 @@ def mozharness_test_on_generic_worker(co
                     mh_command[i] += suffix
 
     if config.params.is_try():
         env['TRY_COMMIT_MSG'] = config.params['message']
 
     worker['mounts'] = [{
         'directory': '.',
         'content': {
-            'artifact': 'public/build/mozharness.zip',
+            'artifact': get_artifact_path(taskdesc, 'mozharness.zip'),
             'task-id': {
                 'task-reference': '<build>'
             }
         },
         'format': 'zip'
     }]
 
     if is_windows:
@@ -347,17 +348,17 @@ def mozharness_test_on_native_engine(con
     test = taskdesc['run']['test']
     mozharness = test['mozharness']
     worker = taskdesc['worker']
     is_talos = test['suite'] == 'talos'
     is_macosx = worker['os'] == 'macosx'
 
     installer_url = get_artifact_url('<build>', mozharness['build-artifact-name'])
     mozharness_url = get_artifact_url('<build>',
-                                      'public/build/mozharness.zip')
+                                      get_artifact_path(taskdesc, 'mozharness.zip'))
 
     worker['artifacts'] = [{
         'name': prefix.rstrip('/'),
         'path': path.rstrip('/'),
         'type': 'directory',
     } for (prefix, path) in [
         # (artifact name prefix, in-image path relative to homedir)
         ("public/logs/", "workspace/build/upload/logs/"),