Bug 1450019 - Upload snap to archive.m.o r=mtabara

Upload snap to archive.m.o

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Johan Lorenzo 2019-03-27 08:17:17 +00:00
Родитель 3d0316a902
Коммит b45f3de16a
7 изменённых файлов: 116 добавлений и 5 удалений

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

@ -0,0 +1,19 @@
# 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.single_dep:loader
transforms:
- taskgraph.transforms.name_sanity:transforms
- taskgraph.transforms.beetmover:transforms
- taskgraph.transforms.beetmover_snap:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- release-snap-repackage # snap builds builds aren't signed
job-template:
attributes:
artifact_map: taskcluster/taskgraph/manifests/firefox_snap.yml
shipping-phase: promote

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

@ -59,6 +59,7 @@ jobs:
firefox:
shipping-product: firefox
attributes:
build_platform: linux64-nightly
build_platform: linux64-snap-nightly
build_type: opt
treeherder:
symbol: Snap(r)

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

@ -196,14 +196,16 @@ release-beetmover-push-to-release publishes promoted releases from the
candidates directory to the release directory. This is part of release
promotion.
beetmover-snap
--------------
Beetmover-source publishes Ubuntu's snap. This is part of release promotion.
beetmover-source
----------------
Beetmover-source publishes release source. This is part of release promotion.
beetmover-geckoview
-------------------
Beetmover-geckoview publishes the Android library called "geckoview".
checksums-signing

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

@ -0,0 +1,38 @@
---
s3_bucket_paths:
- pub/firefox/candidates
default_locales: # Ignored for snap
- en-US
tasktype_map: # Map task reference to task type.
release-snap-repackage: build
platform_names:
path_platform: ''
filename_platform: ''
stage_platform: ''
# A default entry, which the mappings below extend and override.
# Final 'destinations' will be the product of:
# s3_bucket_paths + destinations + locale_prefix + pretty_name
default: &default
all_locales: false
from:
- release-snap-repackage
locale_prefix: ''
source_path_modifier: ''
description: ''
destinations:
- ${version}-candidates/build${build_number}/snap
update_balrog_manifest: false
mapping:
target.snap:
<<: *default
description: "The main installer we ship our mobile products baked within"
pretty_name: firefox-${version}.snap
checksums_path: firefox-${version}.snap.checksums
target.snap.checksums:
<<: *default
description: "The checksums to the main installer."
pretty_name: firefox-${version}.snap.checksums
checksums_path: firefox-${version}.snap.checksums

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

@ -172,7 +172,9 @@ def make_task_description(config, jobs):
dependencies = {dep_job.kind: dep_job.label}
if len(dep_job.dependencies) > 1:
# XXX release snap-repackage has a variable number of dependencies, depending on how many
# "post-beetmover-dummy" jobs there are in the graph.
if dep_job.kind != 'release-snap-repackage' and len(dep_job.dependencies) > 1:
raise NotImplementedError(
"Can't beetmove a signing task with multiple dependencies")
signing_dependencies = dep_job.dependencies
@ -294,7 +296,9 @@ def make_task_worker(config, jobs):
for job in jobs:
valid_beetmover_job = (len(job["dependencies"]) == 2 and
any(['signing' in j for j in job['dependencies']]))
if not valid_beetmover_job:
# XXX release snap-repackage has a variable number of dependencies, depending on how many
# "post-beetmover-dummy" jobs there are in the graph.
if '-snap-' not in job['label'] and not valid_beetmover_job:
raise NotImplementedError("Beetmover must have two dependencies.")
locale = job["attributes"].get("locale")

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

@ -0,0 +1,42 @@
# 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/.
"""
Transform the snap beetmover kind into an actual task description.
"""
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
transforms = TransformSequence()
@transforms.add
def leave_snap_repackage_dependencies_only(config, jobs):
for job in jobs:
# XXX: We delete the build dependency because, unlike the other beetmover
# tasks, source doesn't depend on any build task at all. This hack should
# go away when we rewrite beetmover transforms to allow more flexibility in deps
job['dependencies'] = {
key: value
for key, value in job['dependencies'].items()
if key == 'release-snap-repackage'
}
job['worker']['upstream-artifacts'] = [
upstream_artifact
for upstream_artifact in job['worker']['upstream-artifacts']
if upstream_artifact['taskId']['task-reference'] == '<release-snap-repackage>'
]
yield job
@transforms.add
def set_custom_treeherder_job_name(config, jobs):
for job in jobs:
job.get('treeherder', {})['symbol'] = 'Snap(BM)'
yield job

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

@ -808,6 +808,11 @@ def should_use_artifact_map(platform, project):
This function exists solely for the beetmover artifact map
migration.
"""
if 'linux64-snap-nightly' in platform:
# Snap has never been implemented outside of declarative artifacts. We need to use
# declarative artifacts no matter the branch we're on
return True
# FIXME: once we're ready to switch fully to declarative artifacts on other
# branches, we can expand this; for now, Fennec is rolled-out to all
# release branches, while Firefox only to mozilla-central