Bug 1341352 - add balrogworker support for releases. r=aki

MozReview-Commit-ID: 3bfloRD7fHx

--HG--
extra : rebase_source : 9be48d8708cbeaa60b767881d969a901d6861ecf
This commit is contained in:
Mihai Tabara 2017-02-28 16:30:46 +00:00
Родитель d8818577f1
Коммит e77c1e0621
2 изменённых файлов: 60 добавлений и 7 удалений

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

@ -9,7 +9,8 @@ from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import validate_schema
from taskgraph.util.scriptworker import get_balrog_server_scope
from taskgraph.util.scriptworker import (get_balrog_server_scope,
get_balrog_channel_scopes)
from taskgraph.transforms.task import task_description_schema
from voluptuous import Schema, Any, Required, Optional
@ -92,6 +93,8 @@ def make_task_description(config, jobs):
}]
server_scope = get_balrog_server_scope(config)
channel_scopes = get_balrog_channel_scopes(config)
task = {
'label': label,
'description': "{} Balrog".format(
@ -102,7 +105,7 @@ def make_task_description(config, jobs):
'implementation': 'balrog',
'upstream-artifacts': upstream_artifacts,
},
'scopes': [server_scope],
'scopes': [server_scope] + channel_scopes,
'dependencies': {'beetmover': dep_job.label},
'attributes': attributes,
'run-on-projects': dep_job.attributes.get('run_on_projects'),

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

@ -106,16 +106,60 @@ BALROG_SCOPE_ALIAS_TO_PROJECT = [[
'release', set([
'mozilla-release',
])
], [
'esr', set([
'mozilla-esr52',
])
]]
"""Map the balrog scope aliases to the actual scopes.
"""
BALROG_SERVER_SCOPES = {
'nightly': 'project:releng:balrog:nightly',
'aurora': 'project:releng:balrog:nightly',
'beta': 'project:releng:balrog:nightly',
'release': 'project:releng:balrog:nightly',
'default': 'project:releng:balrog:nightly',
'nightly': 'project:releng:balrog:server:nightly',
'aurora': 'project:releng:balrog:server:aurora',
'beta': 'project:releng:balrog:server:beta',
'release': 'project:releng:balrog:server:release',
'esr': 'project:releng:balrog:server:esr',
'default': 'project:releng:balrog:server:dep',
}
"""Map the balrog scope aliases to the actual channel scopes.
"""
BALROG_CHANNEL_SCOPES = {
'nightly': [
'project:releng:balrog:channel:nightly'
],
'aurora': [
'project:releng:balrog:channel:aurora'
],
'beta': [
'project:releng:balrog:channel:beta',
'project:releng:balrog:channel:beta-localtest',
'project:releng:balrog:channel:beta-cdntest'
],
'release': [
'project:releng:balrog:channel:release',
'project:releng:balrog:channel:release-localtest',
'project:releng:balrog:channel:release-cdntest'
],
'esr': [
'project:releng:balrog:channel:esr',
'project:releng:balrog:channel:esr-localtest',
'project:releng:balrog:channel:esr-cdntest'
],
'default': [
'project:releng:balrog:channel:nightly'
'project:releng:balrog:channel:aurora'
'project:releng:balrog:channel:beta',
'project:releng:balrog:channel:beta-localtest',
'project:releng:balrog:channel:beta-cdntest'
'project:releng:balrog:channel:release',
'project:releng:balrog:channel:release-localtest',
'project:releng:balrog:channel:release-cdntest'
'project:releng:balrog:channel:esr',
'project:releng:balrog:channel:esr-localtest',
'project:releng:balrog:channel:esr-cdntest'
]
}
@ -178,3 +222,9 @@ get_balrog_server_scope = functools.partial(
BALROG_SCOPE_ALIAS_TO_PROJECT,
BALROG_SERVER_SCOPES
)
get_balrog_channel_scopes = functools.partial(
get_scope_from_project,
BALROG_SCOPE_ALIAS_TO_PROJECT,
BALROG_CHANNEL_SCOPES
)