Bug 1597109 - Define a ship it task that will (sometimes) schedule a release. r=rail

Differential Revision: https://phabricator.services.mozilla.com/D54729

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mihai Tabara 2019-11-29 15:12:08 +00:00
Родитель c421c75d1c
Коммит 932c71ae6c
5 изменённых файлов: 88 добавлений и 3 удалений

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

@ -0,0 +1,40 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
loader: taskgraph.loader.transform:loader
transforms:
- taskgraph.transforms.maybe_release:transforms
- taskgraph.transforms.task:transforms
job-defaults:
description: Check recent releases and trigger a new ship-it phase if worthwhile.
worker-type:
by-release-level:
production: scriptworker-k8s/gecko-3-shipit
staging: scriptworker-k8s/gecko-1-shipit
worker:
implementation: shipit-maybe-release
scopes:
by-release-level:
production:
- project:releng:ship-it:server:production
- project:releng:ship-it:action:create-new-release
staging:
- project:releng:ship-it:server:staging
- project:releng:ship-it:action:create-new-release
run-on-projects: []
jobs:
firefox:
name: maybe-release-firefox
shipping-product: firefox
worker:
phase: push_firefox
devedition:
name: maybe-release-devedition
shipping-product: devedition
worker:
phase: push_devedition

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

@ -617,6 +617,15 @@ iris
----
Iris testing suite
maybe-release
-------------
A shipitscript task that does the following:
1. Checks if automated releases are disabled
2. Checks if the changes between the current revision and the previous releases
revision are considered "worthwhile" for a new release.
3. Triggers the release via ship-it, which will then create an action task.
l10n-bump
---------
Cron-driven tasks that bump l10n-changesets files in-tree, using data from the l10n dashboard.

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

@ -0,0 +1,21 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import resolve_keyed_by
transforms = TransformSequence()
@transforms.add
def make_task_description(config, jobs):
for job in jobs:
for key in ['worker-type', 'scopes']:
resolve_keyed_by(
job, key, item_name=job['name'],
**{'release-level': config.params.release_level()}
)
yield job

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

@ -1,9 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
Add from parameters.yml into Balrog publishing tasks.
"""
from __future__ import absolute_import, print_function, unicode_literals

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

@ -1220,6 +1220,24 @@ def build_ship_it_shipped_payload(config, task, task_def):
}
@payload_builder('shipit-maybe-release', schema={
Required('phase'): basestring,
})
def build_ship_it_maybe_release_payload(config, task, task_def):
# expect branch name, including path
branch = config.params['head_repository'][len('https://hg.mozilla.org/'):]
# 'version' is e.g. '71.0b13' (app_version doesn't have beta number)
version = config.params['version']
task_def['payload'] = {
'product': task['shipping-product'],
'branch': branch,
'phase': task['worker']['phase'],
'version': version,
'cron_revision': config.params['head_rev'],
}
@payload_builder('push-addons', schema={
Required('channel'): Any('listed', 'unlisted'),
Required('upstream-artifacts'): [{