diff --git a/taskcluster/android_taskgraph/transforms/push_android_app.py b/taskcluster/android_taskgraph/transforms/push_android_app.py index 2606cb39c6ac..a074b039bb2e 100644 --- a/taskcluster/android_taskgraph/transforms/push_android_app.py +++ b/taskcluster/android_taskgraph/transforms/push_android_app.py @@ -18,6 +18,7 @@ def resolve_keys(config, tasks): for task in tasks: for key in ( "worker.channel", + "worker.commit", "worker.dep", "worker.certificate-alias", "worker.product", diff --git a/taskcluster/android_taskgraph/transforms/upstream_artifacts.py b/taskcluster/android_taskgraph/transforms/upstream_artifacts.py index c27ab25a6895..5c0906136bab 100644 --- a/taskcluster/android_taskgraph/transforms/upstream_artifacts.py +++ b/taskcluster/android_taskgraph/transforms/upstream_artifacts.py @@ -32,12 +32,14 @@ def build_upstream_artifacts(config, tasks): generate_beetmover_upstream_artifacts(config, task, build_type, locale) ) else: + only_archs = task.pop("only-archs", []) for dep in get_dependencies(config, task): paths = list(dep.attributes.get("artifacts", {}).values()) paths.extend( [ apk_metadata["name"] - for apk_metadata in dep.attributes.get("apks", {}).values() + for arch, apk_metadata in dep.attributes.get("apks", {}).items() + if not only_archs or arch in only_archs ] ) if dep.attributes.get("aab"): diff --git a/taskcluster/android_taskgraph/worker_types.py b/taskcluster/android_taskgraph/worker_types.py index 98b08cb7e743..43f8bff7983f 100644 --- a/taskcluster/android_taskgraph/worker_types.py +++ b/taskcluster/android_taskgraph/worker_types.py @@ -71,7 +71,8 @@ def build_scriptworker_beetmover_payload(config, task, task_def): Required("paths"): [str], } ], - Required("certificate-alias"): str, + Optional("certificate-alias"): str, + Optional("target-store"): str, Required("channel"): str, Required("commit"): bool, Required("product"): str, @@ -84,12 +85,17 @@ def build_push_apk_payload(config, task, task_def): task_def["tags"]["worker-implementation"] = "scriptworker" task_def["payload"] = { - "certificate_alias": worker["certificate-alias"], "channel": worker["channel"], "commit": worker["commit"], "upstreamArtifacts": worker["upstream-artifacts"], } + if "certificate-alias" in worker: + task_def["payload"]["certificate_alias"] = worker["certificate-alias"] + + if "target-store" in worker: + task_def["payload"]["target_store"] = worker["target-store"] + scope_prefix = config.graph_config["scriptworker"]["scope-prefix"] task_def["scopes"].append( "{}:googleplay:product:{}{}".format( diff --git a/taskcluster/docs/kinds.rst b/taskcluster/docs/kinds.rst index 548650f584c8..0f3b5164e8dc 100644 --- a/taskcluster/docs/kinds.rst +++ b/taskcluster/docs/kinds.rst @@ -867,6 +867,10 @@ beetmover-android-app --------------------- A beetmover task for android APKs and AABs. +push-apks +----------- +Push Focus and Fenix APKs to the Samsung Galaxy Store. + push-bundle ----------- Push Focus and Fenix AABs to Google Play. diff --git a/taskcluster/kinds/push-apks/kind.yml b/taskcluster/kinds/push-apks/kind.yml new file mode 100644 index 000000000000..5816b1920981 --- /dev/null +++ b/taskcluster/kinds/push-apks/kind.yml @@ -0,0 +1,65 @@ +# 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.from_deps + - android_taskgraph.transforms.upstream_artifacts + - android_taskgraph.transforms.treeherder + - android_taskgraph.transforms.push_android_app + - android_taskgraph.transforms.startup_tests_deps + - gecko_taskgraph.transforms.task + +kind-dependencies: + - signing-apk + - android-startup-test + +tasks: + push-bundle: + description: Publish Fenix and Focus APKs + from-deps: + kinds: [signing-apk] + with-attributes: + build-type: + - fenix-release + - focus-release + group-by: + attribute: build-type + copy-attributes: true + worker-type: push-apk + only-archs: + - arm64-v8a + - armeabi-v7a + worker: + target-store: samsung + commit: + by-level: + '3': true + default: false + dep: + by-level: + '3': false + default: true + product: + by-build-type: + fenix-release: fenix + focus-release: focus-android + channel: + by-build-type: + fenix-release: fenix-release + focus-release: focus-release + shipping-phase: push + shipping-product: firefox-android + treeherder: + symbol: + by-build-type: + default: gp-apk + focus-release: gpf-apk + kind: build + routes: + by-level: + '3': + - "notify.email.release-mgmt@mozilla.com.on-failed" + 'default': []