bug 1442793 - tests artifact_prefix. r=bhearsum
authorAki Sasaki <asasaki@mozilla.com>
Wed, 07 Mar 2018 13:05:10 -0800
changeset 467487 4055c1ca987b8692fddacfa8711836322bbc0402
parent 467486 d8d0e4665d0bd561b11e195476fc802638aa9e02
child 467488 0b45c230926fb9c5ef9ce075ab22855c84d57dfe
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhearsum
bugs1442793
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1442793 - tests artifact_prefix. r=bhearsum MozReview-Commit-ID: 1KFGftPjG9Z
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -23,16 +23,17 @@ from taskgraph.transforms.base import Tr
 from taskgraph.util.schema import resolve_keyed_by, OptimizationSchema
 from taskgraph.util.treeherder import split_symbol, join_symbol
 from taskgraph.util.platforms import platform_family
 from taskgraph.util.schema import (
     validate_schema,
     optionally_keyed_by,
     Schema,
 )
+from taskgraph.util.taskcluster import get_artifact_path
 from mozbuild.schedules import INCLUSIVE_COMPONENTS
 
 from voluptuous import (
     Any,
     Optional,
     Required,
     Exclusive,
 )
@@ -494,33 +495,44 @@ def setup_talos(config, tests):
         if config.params.is_try():
             extra_options.append('--branch-name')
             extra_options.append('try')
 
         yield test
 
 
 @transforms.add
+def handle_artifact_prefix(config, tests):
+    """Handle translating `artifact_prefix` appropriately"""
+    for test in tests:
+        if test['build-attributes'].get('artifact_prefix'):
+            test.setdefault("attributes", {}).setdefault(
+                'artifact_prefix', test['build-attributes']['artifact_prefix']
+            )
+        yield test
+
+
+@transforms.add
 def set_target(config, tests):
     for test in tests:
         build_platform = test['build-platform']
         target = None
         if 'target' in test:
             resolve_keyed_by(test, 'target', item_name=test['test-name'])
             target = test['target']
         if not target:
             if build_platform.startswith('macosx'):
                 target = 'target.dmg'
             elif build_platform.startswith('android'):
                 target = 'target.apk'
             elif build_platform.startswith('win'):
                 target = 'target.zip'
             else:
                 target = 'target.tar.bz2'
-        test['mozharness']['build-artifact-name'] = 'public/build/' + target
+        test['mozharness']['build-artifact-name'] = get_artifact_path(test, target)
 
         yield test
 
 
 @transforms.add
 def set_treeherder_machine_platform(config, tests):
     """Set the appropriate task.extra.treeherder.machine.platform"""
     translation = {