bug 1398793: set channel list correctly for updates builder. r=jlorenzo

This commit is contained in:
Ben Hearsum 2018-01-09 10:06:40 -05:00
Родитель 33af1e5f22
Коммит 64d59d24fa
3 изменённых файлов: 18 добавлений и 17 удалений

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

@ -74,6 +74,15 @@ jobs:
run:
product: firefox
buildername: release-{branch}-firefox_schedule_publishing_in_balrog
channels:
by-project:
birch: release
maple: beta
mozilla-beta: beta
mozilla-release: release
mozilla-esr52: esr
mozilla-esr59: esr
default: unknown
index:
product: firefox
devedition:
@ -82,5 +91,6 @@ jobs:
run:
product: devedition
buildername: release-{branch}-devedition_schedule_publishing_in_balrog
channels: aurora
index:
product: devedition

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

@ -102,6 +102,7 @@ jobs:
default: "default"
repo_path:
by-project:
birch: "projects/birch"
jamun: "projects/jamun"
maple: "projects/maple"
mozilla-beta: "releases/mozilla-beta"

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

@ -11,7 +11,7 @@ from __future__ import absolute_import, print_function, unicode_literals
import slugid
from urlparse import urlparse
from taskgraph.util.schema import Schema
from taskgraph.util.schema import Schema, optionally_keyed_by, resolve_keyed_by
from taskgraph.util.scriptworker import get_release_config
from voluptuous import Optional, Required, Any
@ -28,6 +28,8 @@ buildbot_run_schema = Schema({
# the product to use
Required('product'): Any('firefox', 'mobile', 'fennec', 'devedition', 'thunderbird'),
Optional('channels'): optionally_keyed_by('project', basestring),
Optional('release-promotion'): bool,
})
@ -39,21 +41,6 @@ def _get_balrog_api_root(branch):
return 'https://balrog-admin.stage.mozaws.net/api'
def _get_balrog_channel(product, branch):
if product == 'devedition':
return 'aurora'
elif product == 'firefox':
if branch in ('mozilla-beta', 'maple'):
return 'beta'
elif branch == 'mozilla-release':
return 'release'
elif branch.startswith('mozilla-esr'):
return 'esr'
# Unsupported channels are filtered out after the task is generated. Then, we must
# provide a dummy value for them, otherwise the Decision task breaks.
return 'unknown'
def bb_release_worker(config, worker, run):
# props
release_props = get_release_config(config)
@ -68,9 +55,12 @@ def bb_release_worker(config, worker, run):
'revision': revision,
})
if 'channels' in run:
release_props['channels'] = run['channels']
resolve_keyed_by(release_props, 'channels', 'channels', **config.params)
if product in ('devedition', 'firefox'):
release_props['balrog_api_root'] = _get_balrog_api_root(branch)
release_props['channels'] = _get_balrog_channel(product, branch)
worker['properties'].update(release_props)
# Setting script_repo_revision to the gecko revision doesn't work for