# 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.partner_attribution:transforms
    - gecko_taskgraph.transforms.job:transforms
    - gecko_taskgraph.transforms.task:transforms

kind-dependencies:
    # macOS
    - toolchain
    - repackage
    - repackage-l10n
    # Windows
    - repackage-signing
    - repackage-signing-l10n

# move this into the single job ??
task-defaults:
    run-on-repo-type: [hg]
    attributes:
        build_platform: linux64-shippable
        build_type: opt
        artifact_prefix: releng/partner
        shippable: true
    description: Release Promotion partner attribution
    run-on-projects: []  # to make sure this never runs as part of CI
    shipping-product: firefox
    shipping-phase: promote
    worker-type: b-linux
    worker:
        artifacts:
            - name: releng/partner
              path: /builds/worker/artifacts/releng/partner
              type: directory
        docker-image:
            in-tree: "partner-repack"
        chain-of-trust: true
        max-run-time: 1800

tasks:
    win:
        platforms:
            - win32-shippable   # Stub installer only
        run:
            using: mach
            mach: python python/mozrelease/mozrelease/attribute_builds.py
    macos:
        fetches:
            toolchain:
                - linux64-libdmg
        platforms:
            - macosx64-shippable
        run:
            using: run-task
            cwd: "{checkout}"
            # Command defined in transforms
            command: "foo"
