# 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:
    - gecko_taskgraph.transforms.release_deps:transforms
    - gecko_taskgraph.transforms.bouncer_aliases:transforms
    - gecko_taskgraph.transforms.task:transforms

kind-dependencies:
    - release-bouncer-check

task-defaults:
    description: Update bouncer aliases job
    worker-type: bouncer
    worker:
        implementation: bouncer-aliases
    scopes:
        by-release-level:
            production:
                - project:releng:bouncer:action:aliases
                - project:releng:bouncer:server:production
            staging:
                - project:releng:bouncer:action:aliases
                - project:releng:bouncer:server:staging
    run-on-projects: []
    shipping-phase: ship
    treeherder:
        symbol: Rel(BncAlias)
        kind: test
        tier: 1

tasks:
    devedition:
        bouncer-products-per-alias:
            firefox-devedition-latest-ssl: installer-ssl
            firefox-devedition-latest: installer
            firefox-devedition-stub: stub-installer
            firefox-devedition-msi-latest-ssl: msi
            firefox-devedition-msix-latest-ssl: msix
        shipping-product: devedition
        treeherder:
            platform: devedition-release/opt

    firefox:
        bouncer-products-per-alias:
            by-release-type:
                beta:
                    firefox-beta-latest-ssl: installer-ssl
                    firefox-beta-latest: installer
                    firefox-beta-stub: stub-installer
                    firefox-beta-msi-latest-ssl: msi
                    firefox-beta-msix-latest-ssl: msix
                    firefox-beta-pkg-latest-ssl: pkg
                    firefox-beta-langpack-latest-ssl: langpack
                release.*:
                    firefox-latest-ssl: installer-ssl
                    firefox-latest: installer
                    firefox-stub: stub-installer
                    firefox-msi-latest-ssl: msi
                    firefox-msix-latest-ssl: msix
                    firefox-pkg-latest-ssl: pkg
                    firefox-langpack-latest-ssl: langpack
                esr128:
                    # when there is one ESR branch both sets of aliases work
                    # when there are two ESR branches ...
                    # ... these always point to the older branch
                    firefox-esr-latest-ssl: installer-ssl
                    firefox-esr-latest: installer
                    firefox-esr-msi-latest-ssl: msi
                    firefox-esr-msix-latest-ssl: msix
                    firefox-esr-pkg-latest-ssl: pkg
                    firefox-esr-langpack-latest-ssl: langpack
                    # ... these point to the newer branch
                    firefox-esr-next-latest-ssl: installer-ssl
                    firefox-esr-next-latest: installer
                    firefox-esr-next-msi-latest-ssl: msi
                    firefox-esr-next-msix-latest-ssl: msix
                    firefox-esr-next-pkg-latest-ssl: pkg
                    firefox-esr-next-langpack-latest-ssl: langpack
                default: {}
        partner-bouncer-products-per-alias:
            by-release-type:
                beta:
                    partner-firefox-beta-PARTNER-latest: installer
                    partner-firefox-beta-PARTNER-stub: stub-installer
                release.*:
                    partner-firefox-release-PARTNER-latest: installer
                    partner-firefox-release-PARTNER-stub: stub-installer
                default: {}
        shipping-product: firefox
        treeherder:
            platform: firefox-release/opt
