bug 1442793 - partials artifact_prefix. r?bhearsum
MozReview-Commit-ID: 2XL2OEpVyWO
--- 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',