# 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/.
import json import logging import os import re
import mozpack.path as mozpath import taskgraph from taskgraph.transforms.base import TransformSequence from taskgraph.util.docker import create_context_tar, generate_context_hash from taskgraph.util.schema import Schema from voluptuous import Optional, Required
from gecko_taskgraph.util.docker import (
image_path,
)
from .. import GECKO from .task import task_description_schema
docker_image_schema = Schema(
{ # Name of the docker image.
Required("name"): str, # Name of the parent docker image.
Optional("parent"): str, # Treeherder symbol.
Required("symbol"): str, # relative path (from config.path) to the file the docker image was defined # in.
Optional("task-from"): str, # Arguments to use for the Dockerfile.
Optional("args"): {str: str}, # Name of the docker image definition under taskcluster/docker, when # different from the docker image name.
Optional("definition"): str, # List of package tasks this docker image depends on.
Optional("packages"): [str],
Optional("arch"): str,
Optional( "index",
description="information for indexing this build so its artifacts can be discovered",
): task_description_schema["index"],
Optional( "cache",
description="Whether this image should be cached based on inputs.",
): bool,
}
)
for p in packages: if f"packages-{p}"notin config.kind_dependencies_tasks: raise Exception( "Missing package job for {}-{}: {}".format(
config.kind, image_name, p
)
)
description = "Build the docker image {} for use by dependent tasks".format(
image_name
)
args["DOCKER_IMAGE_PACKAGES"] = " ".join(f"<{p}>"for p in packages)
# Adjust the zstandard compression level based on the execution level. # We use faster compression for level 1 because we care more about # end-to-end times. We use slower/better compression for other levels # because images are read more often and it is worth the trade-off to # burn more CPU once to reduce image size.
zstd_level = "3"if int(config.params["level"]) == 1 else"10"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.