# 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:
    - packages

transforms:
    - gecko_taskgraph.transforms.docker_image:transforms
    - gecko_taskgraph.transforms.cached_tasks:transforms
    - gecko_taskgraph.transforms.task:transforms

# make a task for each docker-image we might want.  For the moment, since we
# write artifacts for each, these are whitelisted, but ideally that will change
# (to use subdirectory clones of the proper directory), at which point we can
# generate tasks for every docker image in the directory, secure in the
# knowledge that unnecessary images will be omitted from the target task graph
tasks:
    image_builder:
        symbol: I(ib)
    image_builder_arm64:
        symbol: I(ib-a64)
        definition: image_builder
        args:
            ARCH: arm64
    # Neither the ubuntu1804-*raw nor the ubuntu1804-*packages images can have
    # packages dependencies.
    ubuntu1804-raw:
        symbol: I(ub18-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: ubuntu:bionic
    ubuntu1804-packages:
        symbol: I(ub18-pkg)
        definition: debian-packages
        parent: ubuntu1804-raw
    ubuntu1804-i386-raw:
        symbol: I(ub18-32-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: i386/ubuntu:bionic
    ubuntu1804-i386-packages:
        symbol: I(ub18-32-pkg)
        definition: debian-packages
        parent: ubuntu1804-i386-raw
    ubuntu1804-base:
        symbol: I(ub18-base)
        parent: ubuntu1804-raw
        packages:
            - ub18-mercurial
            - ub18-python-zstandard
            - ub18-python-psutil
    ubuntu1804-test-base:
        symbol: I(ub18-test-base)
        parent: ubuntu1804-base
        packages:
            - ub18-libc6
            - ub18-pygobject
            - ub18-pyatspi
            - ub18-python-dbus
            - ub18-32-libc6
    ubuntu1804-test:
        symbol: I(ub18-test)
        parent: ubuntu1804-test-base
    ubuntu1804-build-python:
        symbol: I(ub18-build-python)
        parent: ubuntu1804-base
        definition: build-python
    ubuntu2204-arm64-build-python:
        symbol: I(ub22-a64-build-python)
        parent: ubuntu2204-arm64-base
        definition: build-python
        arch: arm64
    ubuntu1804-build-python-wheels:
        symbol: I(ub18-build-python-wheels)
        parent: ubuntu1804-base
        definition: build-python-wheels
    ubuntu2204-build-python-wheels:
        symbol: I(ub22-build-python-wheels)
        parent: ubuntu2204-base
        definition: build-python-wheels
    ubuntu2404-build-python-wheels:
        symbol: I(ub24-build-python-wheels)
        parent: ubuntu2404-base
        definition: build-python-wheels
    # Neither the ubuntu2004-*raw nor the ubuntu2004-*packages images can have
    # packages dependencies.
    ubuntu2004-raw:
        symbol: I(ub20-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: ubuntu:focal
    ubuntu2204-raw:
        symbol: I(ub22-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: ubuntu:jammy
    ubuntu2204-arm64-raw:
        symbol: I(ub22-a64-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: ubuntu:jammy
        arch: arm64
    ubuntu2204-arm64-packages:
        symbol: I(ub22-a64-pkg)
        definition: debian-packages
        parent: ubuntu2204-arm64-raw
        arch: arm64
    ubuntu2404-raw:
        symbol: I(ub24-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: ubuntu:noble
    ubuntu2404-arm64-raw:
        symbol: I(ub24-a64-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: ubuntu:noble
        arch: arm64
    ubuntu2004-packages:
        symbol: I(ub20-pkg)
        definition: debian-packages
        parent: ubuntu2004-raw
    ubuntu2204-packages:
        symbol: I(ub22-pkg)
        definition: debian-packages
        parent: ubuntu2204-raw
    ubuntu2404-packages:
        symbol: I(ub24-pkg)
        definition: debian-packages
        parent: ubuntu2404-raw
    ubuntu2404-arm64-packages:
        symbol: I(ub24-a64-pkg)
        definition: debian-packages
        parent: ubuntu2404-arm64-raw
        arch: arm64
    ubuntu2004-base:
        symbol: I(ub20-base)
        definition: debian-base
        parent: ubuntu2004-raw
        packages:
            - ub20-mercurial
            - ub20-python-zstandard
    ubuntu2204-base:
        symbol: I(ub22-base)
        definition: debian-base
        parent: ubuntu2204-raw
        packages:
            - ub22-mercurial
            - ub22-python-zstandard
    ubuntu2204-arm64-base:
        symbol: I(ub22-a64-base)
        definition: debian-base
        parent: ubuntu2204-arm64-raw
        packages:
            - ub22-arm64-mercurial
            - ub22-arm64-python-zstandard
        arch: arm64
    ubuntu2404-base:
        symbol: I(ub24-base)
        definition: debian-base
        parent: ubuntu2404-raw
        packages:
            - ub24-mercurial
            - ub24-python-zstandard
    ubuntu2404-arm64-base:
        symbol: I(ub24-a64-base)
        definition: debian-base
        parent: ubuntu2404-arm64-raw
        packages:
            - ub24-arm64-mercurial
            - ub24-arm64-python-zstandard
        arch: arm64
    ubuntu2404-test-base:
        symbol: I(ub24-test-base)
        parent: ubuntu2404-base
    ubuntu2404-arm64-test-base:
        symbol: I(ub24-a64-test-base)
        parent: ubuntu2404-arm64-base
        definition: ubuntu2404-test-base
        arch: arm64
        args:
            ARCH: arm64
    ubuntu2404-test:
        symbol: I(ub24-test)
        parent: ubuntu2404-test-base
    ubuntu2404-arm64-test:
        symbol: I(ub24-a64-test)
        parent: ubuntu2404-arm64-test-base
        definition: ubuntu2404-test
        arch: arm64
    # Neither the debian8-*raw nor the debian8-*packages images can have
    # packages dependencies.
    debian8-raw:
        symbol: I(deb8-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: debian:jessie-20210208
            DIST: jessie
    debian8-packages:
        symbol: I(deb8-pkg)
        definition: debian-packages
        parent: debian8-raw
    debian8-i386-raw:
        symbol: I(deb8-32-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: i386/debian:jessie-20210208
            DIST: jessie
    debian8-i386-packages:
        symbol: I(deb8-32-pkg)
        definition: debian-packages
        parent: debian8-i386-raw
    custom-v8:
        symbol: I(custom-v8)
        parent: debian12-base
    # Chromium-as-Release
    custom-car-linux:
        symbol: I(custom-car-linux)
        parent: debian12-base
    # Chromium-as-Release Android
    custom-car-android:
        symbol: I(custom-car-android)
        parent: debian12-base
    valgrind-build:
        symbol: I(vb)
        parent: debian12-amd64-build
        packages:
            - deb12-valgrind
    lint:
        symbol: I(lnt)
        parent: debian12-base
    # Neither the debian12-raw nor the debian12-packages images can have
    # packages dependencies.
    debian12-raw:
        symbol: I(deb12-raw)
        definition: debian-raw
        args:
            BASE_IMAGE: debian:bookworm-20230612
            DIST: bookworm
            SNAPSHOT: '20230611T210420Z'
    debian12-packages:
        symbol: I(deb12-pkg)
        definition: debian-packages
        parent: debian12-raw
    debian12-base:
        symbol: I(deb12-base)
        definition: debian-base
        parent: debian12-raw
        packages:
            - deb12-mercurial
            - deb12-python-zstandard
    debian12-amd64-build:
        symbol: I(deb12)
        parent: debian12-base
        definition: debian-build
    debian12-repackage:
        symbol: I(deb12-rpk)
        parent: debian12-base
        definition: debian-repackage
        packages:
            - deb12-mercurial
    debian12-flatpak:
        symbol: I(deb12-flatpak)
        parent: debian12-base
        definition: debian-flatpak
        packages:
            - deb12-mercurial
    deb12-toolchain-build:
        symbol: I(deb12-toolchain)
        parent: debian12-base
        definition: toolchain-build
    debian12-rpm-repackage:
        symbol: I(deb12-rpm-rpk)
        parent: debian12-base
        definition: rpm-repackage
        packages:
            - deb12-mercurial
    android-build:
        symbol: I(agb)
        parent: debian12-base
    fetch:
        symbol: I(fetch)
        parent: debian12-raw
        packages:
            - deb12-python-zstandard
    fetch-more:
        symbol: I(fetch-more)
        parent: fetch
    static-analysis-build:
        symbol: I(static-analysis-build)
        parent: debian12-base
    gdb-test:
        symbol: I(gdb)
        parent: debian12-amd64-build
    index-task:
        symbol: I(idx)
    funsize-update-generator:
        symbol: I(pg)
    update-verify:
        symbol: I(uv)
        parent: debian12-base
    diffoscope:
        symbol: I(diff)
        parent: debian12-base
    partner-repack:
        symbol: I(PR)
        parent: debian12-base
        definition: partner-repack
    updatebot:
        symbol: I(3rdp)
        parent: push-to-try
    periodic-updates:
        symbol: I(file)
        parent: debian12-base
    webrender:
        symbol: I(webrender)
        parent: debian12-base
    condprof:
        symbol: I(condprof)
        parent: ubuntu1804-test
    sentry:
        symbol: I(sentry)
        parent: debian12-base
    system-symbols-mac:
        symbol: I(system-symbols-mac)
        parent: debian12-base
    system-symbols-win:
        symbol: I(system-symbols-win)
        parent: debian12-base
    system-symbols-win-gfx:
        symbol: I(system-symbols-win-gfx)
        parent: debian12-base
    system-symbols-linux-scraper:
        symbol: I(system-symbols-linux)
        parent: debian12-base
    push-to-try:
        symbol: I(push-to-try)
        parent: debian12-base
    decision:
        symbol: I(decision)
        parent: ubuntu2004-base
    snap-build-core22:
        symbol: I(snap22-build)
        parent: ubuntu2204-base
        definition: snap-coreXX-build
        args:
            SNAP_BASE: core22
            SNAP_LIST: "core20 core24 gnome-42-2204 gtk-common-themes gnome-42-2204-sdk"
            EXTRA_PACKAGES: "libavcodec58 libavutil56"
    snap-build-core24:
        symbol: I(snap24-build)
        parent: ubuntu2404-base
        definition: snap-coreXX-build
        args:
            SNAP_BASE: core24
            SNAP_LIST: "core22 gnome-46-2404 gtk-common-themes gnome-46-2404-sdk mesa-2404"
    android-components:
        symbol: I(android-components)
        parent: debian12-base
    android-ui-tests:
        symbol: I(android-ui-tests)
        parent: ubuntu2204-base
