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

transforms:
    - fenix_taskgraph.transforms.multi_dep:transforms
    - fenix_taskgraph.transforms.signing:transforms
    - taskgraph.transforms.task:transforms

kind-dependencies:
    - build

primary-dependency: build

group-by: build-type

job-template:
    description: Sign Fenix
    worker-type:
        by-build-type:
            (fennec-.+|nightly|beta|production|android-test-nightly):
                by-level:
                    '3': signing
                    default: dep-signing
            default: dep-signing
    worker:
        signing-type:
            by-build-type:
                fennec-(beta|production):
                    by-level:
                        '3': fennec-production-signing
                        default: dep-signing
                fennec-nightly:
                    by-level:
                        '3': fennec-nightly-signing
                        default: dep-signing
                nightly:
                    by-level:
                        '3': nightly-signing
                        default: dep-signing
                android-test-nightly:
                    by-level:
                        '3': nightly-signing
                        default: dep-signing
                performance-test: dep-signing
                beta:
                    by-level:
                        '3': beta-signing
                        default: dep-signing
                production:
                    by-level:
                        '3': production-signing
                        default: dep-signing
                default: dep-signing
    signing-format:
      by-build-type:
          # Fennec nightly cannot have the sha256 checksums. For more details, see
          # https://github.com/mozilla-releng/scriptworker-scripts/pull/102#issue-349016967
          fennec-nightly: autograph_apk_fennec_sha1
          default: autograph_apk
    index:
        by-build-type:
            (fennec-.+|nightly|performance-test|beta|production):
                type: signing
            default: {}
    run-on-tasks-for: []
    treeherder:
        job-symbol:
            by-build-type:
                android-test.+: Bats
                default: Bs
        kind: build
        platform: android-all/opt
        tier: 2
