зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1594621 - allow for attributes in fetch tasks. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D70141 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bb0b410a92
Коммит
e81d58f570
|
@ -66,6 +66,8 @@ FETCH_SCHEMA = Schema({
|
|||
"`public/` the artifact will require scopes to access.",
|
||||
): text_type,
|
||||
|
||||
Optional('attributes'): {text_type: object},
|
||||
|
||||
Required('fetch'): {
|
||||
Required('type'): text_type,
|
||||
Extra: object,
|
||||
|
@ -143,10 +145,14 @@ def make_task(config, jobs):
|
|||
env.update({
|
||||
'UPLOAD_DIR': '/builds/worker/artifacts'
|
||||
})
|
||||
attributes = job.get('attributes', {})
|
||||
attributes['fetch-artifact'] = mozpath.join(artifact_prefix, job['artifact_name'])
|
||||
alias = job.get('fetch-alias')
|
||||
if alias:
|
||||
attributes['fetch-alias'] = alias
|
||||
|
||||
task = {
|
||||
'attributes': {
|
||||
'fetch-artifact': mozpath.join(artifact_prefix, job['artifact_name'])
|
||||
},
|
||||
'attributes': attributes,
|
||||
'name': name,
|
||||
'description': job['description'],
|
||||
'expires-after': expires,
|
||||
|
@ -177,10 +183,6 @@ def make_task(config, jobs):
|
|||
},
|
||||
}
|
||||
|
||||
alias = job.get('fetch-alias')
|
||||
if alias:
|
||||
task['attributes']['fetch-alias'] = alias
|
||||
|
||||
if not taskgraph.fast:
|
||||
cache_name = task['label'].replace('{}-'.format(config.kind), '', 1)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче