# 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: fenix_taskgraph.loader.multi_dep:loader

kind-dependencies:
    - browsertime
    - toolchain

primary-dependency:
    - browsertime

group-by: attributes

only-for-attributes:
    - run-visual-metrics

transforms:
    - fenix_taskgraph.transforms.visual_metrics:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.task:transforms

job-template:
    attributes:
        nightly: true
    description: "Run visual metrics calculations on Raptor"
    run-on-projects: []
    run-on-tasks-for: []
    worker-type: b-android
    treeherder:
        tier: 2
        kind: other
    worker:
        docker-image: {in-tree: visual-metrics}
        max-run-time: 900
        artifacts:
            - type: file
              name: public/perfherder-data.json
              path: /builds/worker/artifacts/perfherder-data.json
            - type: file
              name: public/summary.json
              path: /builds/worker/artifacts/summary.json
    fetches:
        toolchain:
            - visual-metrics
    run:
        using: run-task
        command: /builds/worker/bin/run-visual-metrics.py -- --orange --perceptual --contentful --force --renderignore 5 --json --viewport
        checkout: false
        run-as-root: true
