# 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
    - gecko_taskgraph.transforms.name_sanity
    - gecko_taskgraph.transforms.repackage
    - gecko_taskgraph.transforms.repackage_routes
    - gecko_taskgraph.transforms.job
    - gecko_taskgraph.transforms.task

kind-dependencies:
    - build-signing
    - toolchain

only-for-build-platforms:
    - linux-shippable/opt
    - linux-devedition/opt
    - linux64-shippable/opt
    - linux64-devedition/opt
    - linux64-aarch64-shippable/opt

only-for-attributes:
    - nightly
    - shippable

tasks:
    repackage-deb:
        from-deps:
            group-by: single-with-filters
        shipping-phase: promote
        worker-type: b-linux-gcp
        worker:
            docker-image:
                in-tree: debian12-repackage
        mozharness:
            run-as-root: true
            use-caches: false
            config:
                by-build-platform:
                    linux\b.*:
                        - repackage/base.py
                        - repackage/linux32_signed.py
                    linux64\b.*:
                        - repackage/base.py
                        - repackage/linux64_signed.py
        treeherder:
            symbol: Rpk-deb
        package-formats:
            by-build-platform:
                linux.*: [deb]
