Bug 1488127 - Make 52 -> 60 updates signed with the old mar scheme (instead of mar_384) r=tomprince a=release

Make 52 -> 60 updates signed with the old mar scheme (instead of mar_384)

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Johan Lorenzo 2018-09-03 06:09:04 +00:00
Родитель 1d0ba58008
Коммит 55321532bc
3 изменённых файлов: 34 добавлений и 5 удалений

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

@ -334,8 +334,8 @@ def generate_partials_upstream_artifacts(job, artifacts, platform, locale=None):
upstream_artifacts = [{
'taskId': {'task-reference': '<partials-signing>'},
'taskType': 'signing',
'paths': ["{}/{}".format(artifact_prefix, p)
for p in artifacts],
'paths': ["{}/{}".format(artifact_prefix, path)
for path, _ in artifacts],
'locale': locale or 'en-US',
}]

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

@ -33,14 +33,36 @@ def generate_upstream_artifacts(job, release_history, platform, locale=None):
upstream_artifacts = [{
"taskId": {"task-reference": '<partials>'},
"taskType": 'partials',
"paths": ["{}/{}".format(artifact_prefix, p)
for p in artifacts],
"paths": [
"{}/{}".format(artifact_prefix, path)
for path, version in artifacts
# TODO Use mozilla-version to avoid comparing strings. Otherwise Firefox 100 will be
# considered smaller than Firefox 56
if version is None or version >= '56'
],
"formats": ["mar_sha384"],
}]
old_mar_upstream_artifacts = {
"taskId": {"task-reference": '<partials>'},
"taskType": 'partials',
"paths": [
"{}/{}".format(artifact_prefix, path)
for path, version in artifacts
# TODO Use mozilla-version to avoid comparing strings. Otherwise Firefox 100 will be
# considered smaller than Firefox 56
if version is not None and version < '56'
],
"formats": ["mar"],
}
if old_mar_upstream_artifacts["paths"]:
upstream_artifacts.append(old_mar_upstream_artifacts)
return upstream_artifacts
@transforms.add
def make_task_description(config, jobs):
for job in jobs:
@ -81,7 +103,11 @@ def make_task_description(config, jobs):
signing_cert_scope = get_signing_cert_scope_per_platform(
build_platform, is_nightly, config
)
scopes = [signing_cert_scope, 'project:releng:signing:format:mar_sha384']
if any("mar" in upstream_details["formats"] for upstream_details in upstream_artifacts):
scopes.append('project:releng:signing:format:mar')
task = {
'label': label,
'description': "{} Partials".format(

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

@ -91,7 +91,10 @@ def get_builds(release_history, platform, locale):
def get_partials_artifacts(release_history, platform, locale):
platform = _sanitize_platform(platform)
return release_history.get(platform, {}).get(locale, {}).keys()
return [
(artifact, details.get('previousVersion', None))
for artifact, details in release_history.get(platform, {}).get(locale, {}).items()
]
def get_partials_artifact_map(release_history, platform, locale):