# 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:
    - toolchain
    - release-update-verify-config
    - post-balrog-dummy
    - post-beetmover-dummy
    - release-balrog-submit-toplevel
    - release-beetmover-push-to-release

transforms:
    - gecko_taskgraph.transforms.release:run_on_releases
    - gecko_taskgraph.transforms.release_deps:transforms
    - gecko_taskgraph.transforms.update_test:transforms
    - gecko_taskgraph.transforms.job:transforms
    - gecko_taskgraph.transforms.task:transforms

task-defaults:
    run-on-repo-type: [hg]
    shipping-product: firefox
    run-on-releases: [release, release-rc, beta, esr140]
    treeherder:
        kind: other
        tier: 2
        symbol: updt-tst(fx)
    worker:
        max-run-time: 10800
        artifacts:
            - type: directory
              path: update-test
              name: public/update-test
        env:
            UPLOAD_DIR: .
            VERSION_LOG_FILENAME: update-test-version-info.log
    run-on-projects: []
    index:
        product: firefox
    run:
        using: run-task
        command: >-
            ./mach update-test
    worker-type:
        by-test-platform:
            windows11-64-24h2-shippable: win11-64-24h2-source
            windows10-64-2009-shippable-qr: win10-64-2009-source
            macosx1500-aarch64-shippable: t-osx-1500-m4
            macosx1470-64-shippable: t-osx-1400-r8
            macosx1015-64-shippable-qr: t-osx-1015-r8
            linux.*: t-linux-docker-amd

tasks:
    update-test-locale-fx:
        shipping-phase: promote
        test-platforms:
            - windows11-64-24h2-shippable
            - windows10-64-2009-shippable-qr
            - macosx1500-aarch64-shippable
            - macosx1470-64-shippable
            - macosx1015-64-shippable-qr

    update-test-linux-docker-locale-fx:
        shipping-phase: promote
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test
        test-platforms:
            - linux2404-64-shippable

    update-test-source-version-fx:
        shipping-phase: promote
        test-platforms:
            - windows11-64-24h2-shippable
            - windows10-64-2009-shippable-qr
            - macosx1500-aarch64-shippable
            - macosx1470-64-shippable
            - macosx1015-64-shippable-qr

    update-test-linux-docker-source-version-fx:
        shipping-phase: promote
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test
        test-platforms:
            - linux2404-64-shippable

    update-test-fx-bkg:
        shipping-phase: promote
        run:
            command: >-
                ./mach update-test --test-type Background
        test-platforms:
            - windows11-64-24h2-shippable
            - windows10-64-2009-shippable-qr
            - macosx1500-aarch64-shippable
            - macosx1470-64-shippable
            - macosx1015-64-shippable-qr

    update-test-linux-docker-fx-bkg:
        shipping-phase: promote
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test --test-type Background
        test-platforms:
            - linux2404-64-shippable

    update-test-push-locale-fx:
        run-on-releases: [release, esr140]
        shipping-phase: push
        test-platforms:
            - windows11-64-24h2-shippable
            - macosx1500-aarch64-shippable

    update-test-linux-docker-push-locale-fx:
        run-on-releases: [release, esr140]
        shipping-phase: push
        worker-type: t-linux-docker-amd
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test
        test-platforms:
            - linux2404-64-shippable
