コード例 #1
0
    # attributes is used for enabling artifact-map by declarative artifacts
    Required("attributes"): {
        str: object
    },
    # unique label to describe this beetmover task, defaults to {dep.label}-beetmover
    Optional("label"):
    str,
    # treeherder is allowed here to override any defaults we use for beetmover.  See
    # taskcluster/gecko_taskgraph/transforms/task.py for the schema details, and the
    # below transforms for defaults of various values.
    Optional("treeherder"):
    task_description_schema["treeherder"],
    Required("description"):
    str,
    Required("worker-type"):
    optionally_keyed_by("release-level", str),
    Required("run-on-projects"): [],
    # locale is passed only for l10n beetmoving
    Optional("locale"):
    str,
    Optional("shipping-phase"):
    task_description_schema["shipping-phase"],
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
})

transforms.add_validate(beetmover_description_schema)


@transforms.add
def resolve_keys(config, jobs):
コード例 #2
0
ファイル: balrog_submit.py プロジェクト: Floflis/gecko-b2g
    optionally_keyed_by,
    resolve_keyed_by,
)
from gecko_taskgraph.util.treeherder import replace_group
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Optional

balrog_description_schema = schema.extend({
    # unique label to describe this balrog task, defaults to balrog-{dep.label}
    Optional("label"):
    str,
    Optional(
        "update-no-wnp",
        description="Whether the parallel `-No-WNP` blob should be updated as well.",
    ):
    optionally_keyed_by("release-type", bool),
    # treeherder is allowed here to override any defaults we use for beetmover.  See
    # taskcluster/gecko_taskgraph/transforms/task.py for the schema details, and the
    # below transforms for defaults of various values.
    Optional("treeherder"):
    task_description_schema["treeherder"],
    Optional("attributes"):
    task_description_schema["attributes"],
    # Shipping product / phase
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
    Optional("shipping-phase"):
    task_description_schema["shipping-phase"],
})

transforms = TransformSequence()
コード例 #3
0
def _by_platform(arg):
    return optionally_keyed_by("build-platform", arg)
コード例 #4
0
 # below transforms for defaults of various values.
 Optional("treeherder"): job_description_schema["treeherder"],
 # If a l10n task, the corresponding locale
 Optional("locale"): str,
 # Routes specific to this task, if defined
 Optional("routes"): [str],
 # passed through directly to the job description
 Optional("extra"): job_description_schema["extra"],
 # passed through to job description
 Optional("fetches"): job_description_schema["fetches"],
 Optional("run-on-projects"): job_description_schema["run-on-projects"],
 # Shipping product and phase
 Optional("shipping-product"): job_description_schema["shipping-product"],
 Optional("shipping-phase"): job_description_schema["shipping-phase"],
 Required("package-formats"): optionally_keyed_by(
     "build-platform", "release-type", [str]
 ),
 Optional("msix"): {
     Optional("channel"): optionally_keyed_by(
         "package-format",
         "level",
         "build-platform",
         "release-type",
         "shipping-product",
         str,
     ),
     Optional("identity-name"): optionally_keyed_by(
         "package-format",
         "level",
         "build-platform",
         "release-type",
コード例 #5
0
source_test_description_schema = Schema({
    # most fields are passed directly through as job fields, and are not
    # repeated here
    Extra:
    object,
    # The platform on which this task runs.  This will be used to set up attributes
    # (for try selection) and treeherder metadata (for display).  If given as a list,
    # the job will be "split" into multiple tasks, one with each platform.
    Required("platform"):
    Any(str, [str]),
    # Build labels required for the task. If this key is provided it must
    # contain a build label for the task platform.
    # The task will then depend on a build task, and the installer url will be
    # saved to the GECKO_INSTALLER_URL environment variable.
    Optional("require-build"):
    optionally_keyed_by("project", {str: str}),
    # These fields can be keyed by "platform", and are otherwise identical to
    # job descriptions.
    Required("worker-type"):
    optionally_keyed_by("platform", job_description_schema["worker-type"]),
    Required("worker"):
    optionally_keyed_by("platform", job_description_schema["worker"]),
    Optional("python-version"): [int],
    Optional("dependencies"): {
        k: optionally_keyed_by("platform", v)
        for k, v in job_description_schema["dependencies"].items()
    },
    # A list of artifacts to install from 'fetch' tasks.
    Optional("fetches"): {
        str:
        optionally_keyed_by("platform",
コード例 #6
0
ファイル: raptor.py プロジェクト: Floflis/gecko-b2g
    Optional,
    Required,
    Extra,
)

from gecko_taskgraph.transforms.base import TransformSequence
from gecko_taskgraph.transforms.tests import test_description_schema
from gecko_taskgraph.util.schema import optionally_keyed_by, resolve_keyed_by, Schema
from gecko_taskgraph.util.treeherder import split_symbol, join_symbol

transforms = TransformSequence()

raptor_description_schema = Schema({
    # Raptor specific configs.
    Optional("apps"):
    optionally_keyed_by("test-platform", "subtest", [str]),
    Optional("raptor-test"):
    str,
    Optional("raptor-subtests"):
    optionally_keyed_by("app", "test-platform", list),
    Optional("activity"):
    optionally_keyed_by("app", str),
    Optional("binary-path"):
    optionally_keyed_by("app", str),
    # Configs defined in the 'test_description_schema'.
    Optional("max-run-time"):
    optionally_keyed_by("app", "subtest", "test-platform",
                        test_description_schema["max-run-time"]),
    Optional("run-on-projects"):
    optionally_keyed_by(
        "app",
コード例 #7
0
from gecko_taskgraph.loader.single_dep import schema
from gecko_taskgraph.transforms.base import TransformSequence
from gecko_taskgraph.util.attributes import copy_attributes_from_dependent_job
from gecko_taskgraph.util.schema import resolve_keyed_by, optionally_keyed_by
from gecko_taskgraph.util.treeherder import inherit_treeherder_from_dep
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Any, Required

transforms = TransformSequence()

langpack_sign_push_description_schema = schema.extend(
    {
        Required("label"): str,
        Required("description"): str,
        Required("worker-type"): optionally_keyed_by("release-level", str),
        Required("worker"): {
            Required("implementation"): "push-addons",
            Required("channel"): optionally_keyed_by(
                "project", "platform", Any("listed", "unlisted")
            ),
            Required("upstream-artifacts"): None,  # Processed here below
        },
        Required("run-on-projects"): [],
        Required("scopes"): optionally_keyed_by("release-level", [str]),
        Required("shipping-phase"): task_description_schema["shipping-phase"],
        Required("shipping-product"): task_description_schema["shipping-product"],
    }
)

コード例 #8
0
ファイル: perftest.py プロジェクト: Floflis/gecko-b2g
from gecko_taskgraph.transforms.base import TransformSequence
from gecko_taskgraph.util.schema import optionally_keyed_by, resolve_keyed_by, Schema
from gecko_taskgraph.util.treeherder import split_symbol, join_symbol

transforms = TransformSequence()

perftest_description_schema = Schema({
    # The test names and the symbols to use for them: [test-symbol, test-path]
    Optional("perftest"): [[str]],
    # Metrics to gather for the test. These will be merged
    # with options specified through perftest-perfherder-global
    Optional("perftest-metrics"):
    optionally_keyed_by(
        "perftest",
        Any(
            [str],
            {str: Any(None, {str: Any(None, str, [str])})},
        ),
    ),
    # Perfherder data options that will be applied to
    # all metrics gathered.
    Optional("perftest-perfherder-global"):
    optionally_keyed_by("perftest", {str: Any(None, str, [str])}),
    # Extra options to add to the test's command
    Optional("perftest-extra-options"):
    optionally_keyed_by("perftest", [str]),
    # Variants of the test to make based on extra browsertime
    # arguments. Expecting:
    #    [variant-suffix, options-to-use]
    # If variant-suffix is `null` then the options will be added
    # to the existing task. Otherwise, a new variant is created
コード例 #9
0
from gecko_taskgraph.transforms.base import TransformSequence
from gecko_taskgraph.transforms.task import task_description_schema
from gecko_taskgraph.util.schema import optionally_keyed_by, resolve_keyed_by, Schema
from gecko_taskgraph.util.scriptworker import add_scope_prefix

from voluptuous import Optional, Required

push_flatpak_description_schema = Schema(
    {
        Required("name"): str,
        Required("job-from"): task_description_schema["job-from"],
        Required("dependencies"): task_description_schema["dependencies"],
        Required("description"): task_description_schema["description"],
        Required("treeherder"): task_description_schema["treeherder"],
        Required("run-on-projects"): task_description_schema["run-on-projects"],
        Required("worker-type"): optionally_keyed_by("release-level", str),
        Required("worker"): object,
        Optional("scopes"): [str],
        Required("shipping-phase"): task_description_schema["shipping-phase"],
        Required("shipping-product"): task_description_schema["shipping-product"],
        Optional("extra"): task_description_schema["extra"],
        Optional("attributes"): task_description_schema["attributes"],
    }
)

transforms = TransformSequence()
transforms.add_validate(push_flatpak_description_schema)


@transforms.add
def make_task_description(config, jobs):
コード例 #10
0
from gecko_taskgraph.util.schema import resolve_keyed_by, optionally_keyed_by
from gecko_taskgraph.util.scriptworker import generate_beetmover_artifact_map
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional

beetmover_description_schema = schema.extend({
    Optional("label"):
    str,
    Optional("treeherder"):
    task_description_schema["treeherder"],
    Required("run-on-projects"):
    task_description_schema["run-on-projects"],
    Required("run-on-hg-branches"):
    task_description_schema["run-on-hg-branches"],
    Optional("bucket-scope"):
    optionally_keyed_by("release-level", str),
    Optional("shipping-phase"):
    optionally_keyed_by("project", task_description_schema["shipping-phase"]),
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
    Optional("attributes"):
    task_description_schema["attributes"],
})

transforms = TransformSequence()
transforms.add_validate(beetmover_description_schema)


@transforms.add
def resolve_keys(config, jobs):
    for job in jobs: