Bug 1867428 - Set Flathub scope in release-push-flatpak via description schema to allow for different scopes. r=jcristau,taskgraph-reviewers,releng-reviewers,rjl

Differential Revision: https://phabricator.services.mozilla.com/D195192
This commit is contained in:
Daniel Darnell 2023-12-05 16:39:46 +00:00
Родитель 8fa44d23a8
Коммит 1017109e01
2 изменённых файлов: 3 добавлений и 1 удалений

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

@ -37,5 +37,6 @@ job-defaults:
jobs:
firefox:
shipping-product: firefox
flathub-scope: "flathub:firefox"
treeherder:
symbol: Flatpak(push)

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

@ -26,6 +26,7 @@ push_flatpak_description_schema = Schema(
Optional("scopes"): [str],
Required("shipping-phase"): task_description_schema["shipping-phase"],
Required("shipping-product"): task_description_schema["shipping-product"],
Required("flathub-scope"): str,
Optional("extra"): task_description_schema["extra"],
Optional("attributes"): task_description_schema["attributes"],
}
@ -61,7 +62,7 @@ def make_task_description(config, jobs):
job.setdefault("scopes", []).append(
add_scope_prefix(
config,
"flathub:firefox:{}".format(job["worker"]["channel"]),
"{}:{}".format(job.pop("flathub-scope"), job["worker"]["channel"]),
)
)