# 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

kind-dependencies:
    - beetmover-source
    - post-beetmover-checksums-dummy
    - release-beetmover-signed-langpacks

transforms:
    - gecko_taskgraph.transforms.build:transforms
    - gecko_taskgraph.transforms.release_deps:transforms
    - gecko_taskgraph.transforms.release_generate_checksums:transforms
    - gecko_taskgraph.transforms.job:transforms
    - gecko_taskgraph.transforms.task:transforms

task-defaults:
    name: generate-checksums
    description: generates checksums
    run-on-projects: []  # to make sure this never runs as part of CI
    shipping-phase: promote
    worker-type: b-linux-gcp
    worker:
        max-run-time: 1200
        artifacts:
            - name: public/build/SHA256SUMMARY
              path: /builds/worker/SHA256SUMMARY
              type: file
            - name: public/build/SHA256SUMS
              path: /builds/worker/SHA256SUMS
              type: file
            - name: public/build/SHA512SUMMARY
              path: /builds/worker/SHA512SUMMARY
              type: file
            - name: public/build/SHA512SUMS
              path: /builds/worker/SHA512SUMS
              type: file
    run:
        using: mozharness
        config: []  # See extra-config below
        actions: [create-virtualenv, collect-individual-checksums, create-big-checksums, create-summary]
        options:
            - "version={version}"
            - "build-number={build_number}"
        script: "mozharness/scripts/release/generate-checksums.py"
    treeherder:
        symbol: Rel(GenChcks)
        kind: test
        tier: 1

tasks:
    firefox:
        shipping-product: firefox
        attributes:
            build_platform: firefox-release
            build_type: opt
        run:
            extra-config:
                by-release-level:
                    production:
                        stage_product: "firefox"
                        bucket_name: "moz-fx-productdelivery-pr-38b5-productdelivery"
                    staging:
                        stage_product: "firefox"
                        bucket_name: "moz-fx-productdelivery-no-7d6a-productdelivery"
        treeherder:
            platform: firefox-release/opt

    devedition:
        shipping-product: devedition
        attributes:
            build_platform: devedition-release
            build_type: opt
        run:
            extra-config:
                by-release-level:
                    production:
                        stage_product: "devedition"
                        bucket_name: "moz-fx-productdelivery-pr-38b5-productdelivery"
                    staging:
                        stage_product: "devedition"
                        bucket_name: "moz-fx-productdelivery-no-7d6a-productdelivery"
        treeherder:
            platform: devedition-release/opt
