mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 1745203 - Add release-msix-push task, run on beta only; r=aki
Add taskcluster config for publishing msix archives on the Microsoft Store. Differential Revision: https://phabricator.services.mozilla.com/D136539
This commit is contained in:
parent
138ffc5f52
commit
1112891da7
41
taskcluster/ci/release-msix-push/kind.yml
Normal file
41
taskcluster/ci/release-msix-push/kind.yml
Normal file
@ -0,0 +1,41 @@
|
||||
# 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: gecko_taskgraph.loader.transform:loader
|
||||
|
||||
transforms:
|
||||
- gecko_taskgraph.transforms.release:run_on_releases
|
||||
- gecko_taskgraph.transforms.release_deps:transforms
|
||||
- gecko_taskgraph.transforms.release_msix_push:transforms
|
||||
- gecko_taskgraph.transforms.task:transforms
|
||||
|
||||
kind-dependencies:
|
||||
- repackage-shippable-l10n-msix
|
||||
|
||||
job-defaults:
|
||||
description: Pushes msix archives to Microsoft Store
|
||||
run-on-projects: [] # to make sure this never runs as part of CI
|
||||
run-on-releases: [beta]
|
||||
shipping-phase: ship
|
||||
treeherder:
|
||||
platform: win32-shippable/opt
|
||||
kind: build
|
||||
tier: 2
|
||||
worker-type:
|
||||
by-release-level:
|
||||
production: scriptworker-k8s/gecko-3-pushmsix
|
||||
staging: scriptworker-k8s/gecko-1-pushmsix
|
||||
worker:
|
||||
implementation: push-msix
|
||||
channel:
|
||||
by-release-type:
|
||||
beta: beta
|
||||
release: release
|
||||
default: mock
|
||||
|
||||
jobs:
|
||||
firefox:
|
||||
shipping-product: firefox
|
||||
treeherder:
|
||||
symbol: MSIX(push)
|
@ -565,6 +565,10 @@ repackage-signing-shippable-l10n-msix
|
||||
Repackage-signing-shippable-l10n-msix takes Windows MSIX packages produced in
|
||||
```repackage-signing-shippable-l10n-msix``` and signs them.
|
||||
|
||||
release-msix-push
|
||||
--------------------
|
||||
Pushes msix repackage to the Microsoft Store.
|
||||
|
||||
repo-update
|
||||
-----------
|
||||
Repo-Update tasks are tasks that perform some action on the project repo itself,
|
||||
|
78
taskcluster/gecko_taskgraph/transforms/release_msix_push.py
Normal file
78
taskcluster/gecko_taskgraph/transforms/release_msix_push.py
Normal file
@ -0,0 +1,78 @@
|
||||
# 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 release-msix-push kind into an actual task description.
|
||||
"""
|
||||
|
||||
|
||||
from gecko_taskgraph.transforms.base import TransformSequence
|
||||
from gecko_taskgraph.transforms.task import task_description_schema
|
||||
from gecko_taskgraph.util.attributes import release_level
|
||||
from gecko_taskgraph.util.schema import optionally_keyed_by, resolve_keyed_by, Schema
|
||||
from gecko_taskgraph.util.scriptworker import add_scope_prefix
|
||||
|
||||
from voluptuous import Optional, Required
|
||||
|
||||
push_msix_description_schema = Schema(
|
||||
{
|
||||
Required("name"): str,
|
||||
Required("job-from"): task_description_schema["job-from"],
|
||||
Required("dependencies"): task_description_schema["dependencies"],
|
||||
Required("description"): task_description_schema["description"],
|
||||
Required("treeherder"): task_description_schema["treeherder"],
|
||||
Required("run-on-projects"): task_description_schema["run-on-projects"],
|
||||
Required("worker-type"): optionally_keyed_by("release-level", str),
|
||||
Required("worker"): object,
|
||||
Optional("scopes"): [str],
|
||||
Required("shipping-phase"): task_description_schema["shipping-phase"],
|
||||
Required("shipping-product"): task_description_schema["shipping-product"],
|
||||
Optional("extra"): task_description_schema["extra"],
|
||||
Optional("attributes"): task_description_schema["attributes"],
|
||||
}
|
||||
)
|
||||
|
||||
transforms = TransformSequence()
|
||||
transforms.add_validate(push_msix_description_schema)
|
||||
|
||||
|
||||
@transforms.add
|
||||
def make_task_description(config, jobs):
|
||||
for job in jobs:
|
||||
|
||||
job["worker"]["upstream-artifacts"] = generate_upstream_artifacts(
|
||||
job["dependencies"]
|
||||
)
|
||||
|
||||
resolve_keyed_by(
|
||||
job,
|
||||
"worker.channel",
|
||||
item_name=job["name"],
|
||||
**{"release-type": config.params["release_type"]},
|
||||
)
|
||||
resolve_keyed_by(
|
||||
job,
|
||||
"worker-type",
|
||||
item_name=job["name"],
|
||||
**{"release-level": release_level(config.params["project"])},
|
||||
)
|
||||
if release_level(config.params["project"]) == "production":
|
||||
job.setdefault("scopes", []).append(
|
||||
add_scope_prefix(
|
||||
config,
|
||||
"microsoftstore:{}".format(job["worker"]["channel"]),
|
||||
)
|
||||
)
|
||||
|
||||
yield job
|
||||
|
||||
|
||||
def generate_upstream_artifacts(dependencies):
|
||||
return [
|
||||
{
|
||||
"taskId": {"task-reference": f"<{task_kind}>"},
|
||||
"taskType": "build",
|
||||
"paths": ["public/build/target.store.msix"],
|
||||
}
|
||||
for task_kind in dependencies.keys()
|
||||
]
|
@ -1203,6 +1203,28 @@ def build_push_flatpak_payload(config, task, task_def):
|
||||
}
|
||||
|
||||
|
||||
@payload_builder(
|
||||
"push-msix",
|
||||
schema={
|
||||
Required("channel"): str,
|
||||
Required("upstream-artifacts"): [
|
||||
{
|
||||
Required("taskId"): taskref_or_string,
|
||||
Required("taskType"): str,
|
||||
Required("paths"): [str],
|
||||
}
|
||||
],
|
||||
},
|
||||
)
|
||||
def build_push_msix_payload(config, task, task_def):
|
||||
worker = task["worker"]
|
||||
|
||||
task_def["payload"] = {
|
||||
"channel": worker["channel"],
|
||||
"upstreamArtifacts": worker["upstream-artifacts"],
|
||||
}
|
||||
|
||||
|
||||
@payload_builder(
|
||||
"shipit-shipped",
|
||||
schema={
|
||||
|
Loading…
Reference in New Issue
Block a user