bug 1442793 - repackage artifact_prefix. r=bhearsum

MozReview-Commit-ID: KTKKJQJJEAy

--HG--
extra : rebase_source : c792f743fe090251ea55b953d34da53cbb184c1a
This commit is contained in:
Aki Sasaki 2018-03-21 12:32:57 -07:00
Родитель 839bed1924
Коммит 92ae1537a6
1 изменённых файлов: 16 добавлений и 11 удалений

Просмотреть файл

@ -17,7 +17,7 @@ from taskgraph.util.schema import (
resolve_keyed_by,
Schema,
)
from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix
from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix, get_artifact_prefix
from taskgraph.transforms.task import task_description_schema
from voluptuous import Any, Required, Optional
@ -186,7 +186,7 @@ def make_job_description(config, jobs):
worker = {
'env': _generate_task_env(dep_job, build_platform, build_task_ref,
signing_task_ref, locale=locale),
'artifacts': _generate_task_output_files(build_platform, locale=locale),
'artifacts': _generate_task_output_files(dep_job, build_platform, locale=locale),
'chain-of-trust': True,
'max-run-time': 7200 if build_platform.startswith('win') else 3600,
}
@ -273,15 +273,16 @@ def _generate_task_env(task, build_platform, build_task_ref, signing_task_ref, l
raise NotImplementedError('Unsupported build_platform: "{}"'.format(build_platform))
def _generate_task_output_files(build_platform, locale=None):
def _generate_task_output_files(task, build_platform, locale=None):
locale_output_path = '{}/'.format(locale) if locale else ''
artifact_prefix = get_artifact_prefix(task)
if build_platform.startswith('linux') or build_platform.startswith('macosx'):
output_files = [{
'type': 'file',
'path': '/builds/worker/workspace/build/artifacts/{}target.complete.mar'
.format(locale_output_path),
'name': 'public/build/{}target.complete.mar'.format(locale_output_path),
'name': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path),
}]
if build_platform.startswith('macosx'):
@ -289,26 +290,30 @@ def _generate_task_output_files(build_platform, locale=None):
'type': 'file',
'path': '/builds/worker/workspace/build/artifacts/{}target.dmg'
.format(locale_output_path),
'name': 'public/build/{}target.dmg'.format(locale_output_path),
'name': '{}/{}target.dmg'.format(artifact_prefix, locale_output_path),
})
elif build_platform.startswith('win'):
output_files = [{
'type': 'file',
'path': 'public/build/{}target.installer.exe'.format(locale_output_path),
'name': 'public/build/{}target.installer.exe'.format(locale_output_path),
'path': '{}/{}target.installer.exe'.format(artifact_prefix, locale_output_path),
'name': '{}/{}target.installer.exe'.format(artifact_prefix, locale_output_path),
}, {
'type': 'file',
'path': 'public/build/{}target.complete.mar'.format(locale_output_path),
'name': 'public/build/{}target.complete.mar'.format(locale_output_path),
'path': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path),
'name': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path),
}]
# Stub installer is only generated on win32
if '32' in build_platform:
output_files.append({
'type': 'file',
'path': 'public/build/{}target.stub-installer.exe'.format(locale_output_path),
'name': 'public/build/{}target.stub-installer.exe'.format(locale_output_path),
'path': '{}/{}target.stub-installer.exe'.format(
artifact_prefix, locale_output_path
),
'name': '{}/{}target.stub-installer.exe'.format(
artifact_prefix, locale_output_path
),
})
if output_files: