bug 1442793 - partials artifact_prefix. r?bhearsum draft
authorAki Sasaki <asasaki@mozilla.com>
Wed, 21 Mar 2018 15:13:57 -0700
changeset 782034 c6d78d5d348cecade68c98b18c2ac9418e2f5f87
parent 782033 cdf060d2631519ba6e1d1d544f386670d429b46e
child 782035 7ff134f04212a5a72bfc6c1f214b84a71c1f57ec
push id106465
push userasasaki@mozilla.com
push dateSat, 14 Apr 2018 00:42:17 +0000
reviewersbhearsum
bugs1442793
milestone61.0a1
bug 1442793 - partials artifact_prefix. r?bhearsum MozReview-Commit-ID: 2XL2OEpVyWO
taskcluster/taskgraph/transforms/partials.py
--- a/taskcluster/taskgraph/transforms/partials.py
+++ b/taskcluster/taskgraph/transforms/partials.py
@@ -4,38 +4,39 @@
 """
 Transform the partials task into an actual task description.
 """
 from __future__ import absolute_import, print_function, unicode_literals
 
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.util.attributes import copy_attributes_from_dependent_job
 from taskgraph.util.partials import get_balrog_platform_name, get_builds
-from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix
+from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix, get_artifact_prefix
 
 import logging
 logger = logging.getLogger(__name__)
 
 transforms = TransformSequence()
 
 
-def _generate_task_output_files(filenames, locale=None):
+def _generate_task_output_files(job, filenames, locale=None):
     locale_output_path = '{}/'.format(locale) if locale else ''
+    artifact_prefix = get_artifact_prefix(job)
 
     data = list()
     for filename in filenames:
         data.append({
             'type': 'file',
             'path': '/home/worker/artifacts/{}'.format(filename),
-            'name': 'public/build/{}{}'.format(locale_output_path, filename)
+            'name': '{}/{}{}'.format(artifact_prefix, locale_output_path, filename)
         })
     data.append({
         'type': 'file',
         'path': '/home/worker/artifacts/manifest.json',
-        'name': 'public/build/{}manifest.json'.format(locale_output_path)
+        'name': '{}/{}manifest.json'.format(artifact_prefix, locale_output_path)
     })
     return data
 
 
 @transforms.add
 def make_task_description(config, jobs):
     # If no balrog release history, then don't generate partials
     if not config.params.get('release_history'):
@@ -117,17 +118,17 @@ def make_task_description(config, jobs):
             else:
                 mar_channel_id = 'firefox-mozilla-beta'
         elif config.params['project'] == 'mozilla-release':
             mar_channel_id = 'firefox-mozilla-release'
         elif 'esr' in config.params['project']:
             mar_channel_id = 'firefox-mozilla-esr'
 
         worker = {
-            'artifacts': _generate_task_output_files(builds.keys(), locale),
+            'artifacts': _generate_task_output_files(dep_job, builds.keys(), locale),
             'implementation': 'docker-worker',
             'docker-image': {'in-tree': 'funsize-update-generator'},
             'os': 'linux',
             'max-run-time': 3600,
             'chain-of-trust': True,
             'taskcluster-proxy': True,
             'env': {
                 'SHA1_SIGNING_CERT': 'nightly_sha1',