Bug 1492664 - use {artifact-reference: ..} for symbol uploads; r=ted

--HG--
extra : rebase_source : 8635a430859d48ed624db554edc2e010c206c7c9
This commit is contained in:
Dustin J. Mitchell 2018-10-02 14:47:59 +00:00
Родитель e860ab8925
Коммит 90cb516cad
2 изменённых файлов: 15 добавлений и 5 удалений

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

@ -24,12 +24,11 @@ job-template:
docker-image: {in-tree: "lint"}
max-run-time: 900
env:
ARTIFACT_TASKID: {"task-reference": "<build>"}
# {level} gets replaced in the upload_symbols transform
SYMBOL_SECRET: "project/releng/gecko/build/level-{level}/gecko-symbol-upload"
run:
using: mach
mach: python toolkit/crashreporter/tools/upload_symbols.py https://queue.taskcluster.net/v1/task/${ARTIFACT_TASKID}/artifacts/public/build/target.crashreporter-symbols-full.zip
mach: {artifact-reference: "python toolkit/crashreporter/tools/upload_symbols.py <build/public/build/target.crashreporter-symbols-full.zip>"}
sparse-profile: upload-symbols
optimization:
only-if-dependencies-run: null

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

@ -8,14 +8,17 @@ Support for running mach tasks (via run-task)
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.job import run_job_using, configure_taskdesc_for_run
from taskgraph.util.schema import Schema
from taskgraph.util.schema import (
Schema,
taskref_or_string,
)
from voluptuous import Required, Optional, Any
mach_schema = Schema({
Required('using'): 'mach',
# The mach command (omitting `./mach`) to run
Required('mach'): basestring,
Required('mach'): taskref_or_string,
# The sparse checkout profile to use. Value is the filename relative to the
# directory where sparse profiles are defined (build/sparse-profiles/).
@ -41,8 +44,16 @@ defaults = {
def configure_mach(config, job, taskdesc):
run = job['run']
command_prefix = 'cd $GECKO_PATH && ./mach '
mach = run['mach']
if isinstance(mach, dict):
ref, pattern = next(iter(mach.items()))
command = {ref: command_prefix + pattern}
else:
command = command_prefix + mach
# defer to the run_task implementation
run['command'] = 'cd $GECKO_PATH && ./mach {mach}'.format(**run)
run['command'] = command
run['using'] = 'run-task'
del run['mach']
configure_taskdesc_for_run(config, job, taskdesc, job['worker']['implementation'])