# 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: android_taskgraph.loader.multi_dep:loader

transforms:
    - android_taskgraph.transforms.multi_dep:transforms
    - android_taskgraph.transforms.push_apk:transforms
    - android_taskgraph.transforms.treeherder:transforms
    - android_taskgraph.transforms.clean_multi_dep:transforms
    - taskgraph.transforms.task:transforms

kind-dependencies:
    - signing-apk

primary-dependency: signing-apk

group-by: build-type

only-for-build-types:
    - focus-nightly
    - focus-release
    - klar-release
    - focus-beta
    - fenix-nightly
    - fenix-release
    - fenix-beta

task-template:
    description: Publish Focus and Fenix APKs
    worker-type: push-apk
    run-on-tasks-for: []
    worker:
        certificate-alias:
            by-build-type:
                fenix-nightly: fenix-nightly
                fenix-beta: fenix-beta
                fenix-release: fenix-release
                default: focus
        commit: true
        channel:
            by-build-type:
                focus-nightly: focus-nightly
                focus-beta: focus-beta
                focus-release: focus-release
                klar-release: klar-release
                fenix-nightly: fenix-nightly
                fenix-beta: fenix-beta
                fenix-release: fenix-release
        dep:
            by-level:
                '3': false
                default: true
        product:
            by-build-type:
                (fenix-nightly|fenix-release|fenix-beta): fenix
                default: focus-android
    shipping-phase: push     # APKs are sent to testing tracks
    treeherder:
        job-symbol:
            by-build-type:
                default: gp
                focus-release: gpf
                klar-release: gpkl
        kind: build
    routes:
        by-level:
            '3':
              - "notify.email.release-mgmt@mozilla.com.on-failed"
            'default': []
