# 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/.

implementation: taskgraph.task.transform:TransformTask

transforms:
   - taskgraph.transforms.build_attrs:transforms
   - taskgraph.transforms.job:transforms
   - taskgraph.transforms.task:transforms

job-defaults:
    treeherder:
        kind: build
        tier: 1
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
        implementation: docker-worker
        max-run-time: 36000
        docker-image: {in-tree: desktop-build}
        env:
            MOZ_AUTOMATION: "1"

jobs:
    linux64-shell-haz/debug:
        description: "JS Shell Hazard Analysis Linux"
        index:
            product: firefox
            job-name: shell-haz-debug
        treeherder:
            platform: linux64/debug
            symbol: SM-tc(H)
        run:
            using: hazard
            tooltool-manifest: "browser/config/tooltool-manifests/linux64/hazard.manifest"
            command: >
                cd /home/worker/checkouts/gecko/taskcluster/scripts/builder
                && ./build-haz-linux.sh --project shell $HOME/workspace
        when:
            files-changed:
                - js/public/**
                - js/src/**

    linux64-haz/debug:
        description: "Browser Hazard Analysis Linux"
        index:
            product: firefox
            job-name: browser-haz-debug
        treeherder:
            platform: linux64/debug
            symbol: tc(H)
        run:
            using: hazard
            tooltool-manifest: "browser/config/tooltool-manifests/linux64/hazard.manifest"
            mozconfig: "browser/config/mozconfigs/linux64/hazards"
            command: >
                cd /home/worker/checkouts/gecko/taskcluster/scripts/builder
                && ./build-haz-linux.sh --project browser $HOME/workspace
