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

kind-dependencies:
    - toolchain

task-defaults:
    run-on-repo-type: [hg]
    worker-type: b-linux
    fetches:
        toolchain:
            - linux64-node
    optimization:
        skip-unless-expanded: null

tasks:
    browser:
        description: "Build Browser Extensions"
        index:
            product: firefox
            job-name: build-extensions-browser
        treeherder:
            kind: build
            platform: linux64/opt
            symbol: Bext
            tier: 1
        worker:
            artifacts:
                - name: public/browser-extensions/newtab.xpi
                  path: /builds/worker/workspace/obj-build/dist/xpi-stage/newtab@mozilla.org.xpi
                  type: file
                - name: public/browser-extensions/webcompat.xpi
                  path: /builds/worker/workspace/obj-build/dist/xpi-stage/webcompat@mozilla.org.xpi
                  type: file
                - name: public/browser-extensions/data-leak-blocker.xpi
                  path: /builds/worker/workspace/obj-build/dist/xpi-stage/data-leak-blocker@mozilla.com.xpi
                  type: file
            docker-image: {in-tree: debian12-amd64-build}
            env:
                MOZ_OBJDIR: ../../workspace/obj-build
                MOZCONFIG: browser/config/mozconfigs/linux64/browser-extensions
                PERFHERDER_EXTRA_OPTIONS: browser-extensions
            max-run-time: 1800
        run:
            using: mach
            mach: build
        run-on-projects: ['mozilla-central']
