Ejemplo n.º 1
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.scriptworker import get_signing_cert_scope_per_platform
from gecko_taskgraph.util.treeherder import inherit_treeherder_from_dep
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Optional

transforms = TransformSequence()

signing_description_schema = schema.extend(
    {
        Optional("label"): str,
        Optional("extra"): object,
        Optional("shipping-product"): task_description_schema["shipping-product"],
        Optional("shipping-phase"): task_description_schema["shipping-phase"],
    }
)

transforms.add_validate(signing_description_schema)


@transforms.add
def make_signing_description(config, jobs):
    for job in jobs:
        dep_job = job["primary-dependency"]
        attributes = dep_job.attributes
        build_platform = dep_job.attributes.get("build_platform")
        is_nightly = True  # cert_scope_per_platform uses this to choose the right cert
Ejemplo n.º 2
0
"""

import os

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.scriptworker import get_signing_cert_scope_per_platform
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Optional

repackage_signing_description_schema = schema.extend({
    Optional("label"):
    str,
    Optional("treeherder"):
    task_description_schema["treeherder"],
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
    Optional("shipping-phase"):
    task_description_schema["shipping-phase"],
})

SIGNING_FORMATS = {
    "target.installer.exe": ["autograph_authenticode_stub"],
    "target.stub-installer.exe": ["autograph_authenticode_stub"],
    "target.installer.msi": ["autograph_authenticode"],
    "target.installer.msix": ["autograph_authenticode_sha2"],
}

transforms = TransformSequence()
transforms.add_validate(repackage_signing_description_schema)
Ejemplo n.º 3
0
transforms = TransformSequence()

beetmover_description_schema = schema.extend({
    # 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)
Ejemplo n.º 4
0
signing_description_schema = schema.extend(
    {
        # Artifacts from dep task to sign - Sync with taskgraph/transforms/task.py
        # because this is passed directly into the signingscript worker
        Required("upstream-artifacts"): [
            {
                # taskId of the task with the artifact
                Required("taskId"): taskref_or_string,
                # type of signing task (for CoT)
                Required("taskType"): str,
                # Paths to the artifacts to sign
                Required("paths"): [str],
                # Signing formats to use on each of the paths
                Required("formats"): [str],
            }
        ],
        # depname is used in taskref's to identify the taskID of the unsigned things
        Required("depname"): str,
        # attributes for this task
        Optional("attributes"): {str: object},
        # unique label to describe this signing task, defaults to {dep.label}-signing
        Optional("label"): str,
        # treeherder is allowed here to override any defaults we use for signing.  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"],
        # Routes specific to this task, if defined
        Optional("routes"): [str],
        Optional("shipping-phase"): task_description_schema["shipping-phase"],
        Optional("shipping-product"): task_description_schema["shipping-product"],
        Optional("dependent-tasks"): {str: object},
        # Optional control for how long a task may run (aka maxRunTime)
        Optional("max-run-time"): int,
        Optional("extra"): {str: object},
        # Max number of partner repacks per chunk
        Optional("repacks-per-chunk"): int,
        # Override the default priority for the project
        Optional("priority"): task_description_schema["priority"],
    }
)
Ejemplo n.º 5
0
from gecko_taskgraph.util.attributes import copy_attributes_from_dependent_job
from gecko_taskgraph.util.scriptworker import (
    generate_beetmover_artifact_map,
    generate_beetmover_upstream_artifacts,
    get_beetmover_action_scope,
    get_beetmover_bucket_scope,
)
from gecko_taskgraph.util.treeherder import inherit_treeherder_from_dep
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional

beetmover_checksums_description_schema = schema.extend(
    {
        Required("attributes"): {str: object},
        Optional("label"): str,
        Optional("treeherder"): task_description_schema["treeherder"],
        Optional("locale"): str,
        Optional("shipping-phase"): task_description_schema["shipping-phase"],
        Optional("shipping-product"): task_description_schema["shipping-product"],
    }
)

transforms = TransformSequence()
transforms.add_validate(beetmover_checksums_description_schema)


@transforms.add
def make_beetmover_checksums_description(config, jobs):
    for job in jobs:
        dep_job = job["primary-dependency"]
        attributes = dep_job.attributes
Ejemplo n.º 6
0
PACKAGE_FORMATS["installer-stub"]["args"].extend(["--package-name", "{package-name}"])

packaging_description_schema = schema.extend(
    {
        # unique label to describe this repackaging task
        Optional("label"): str,
        # Routes specific to this task, if defined
        Optional("routes"): [str],
        # passed through directly to the job description
        Optional("extra"): task_description_schema["extra"],
        # Shipping product and phase
        Optional("shipping-product"): task_description_schema["shipping-product"],
        Optional("shipping-phase"): task_description_schema["shipping-phase"],
        Required("package-formats"): _by_platform([str]),
        # All l10n jobs use mozharness
        Required("mozharness"): {
            # Config files passed to the mozharness script
            Required("config"): _by_platform([str]),
            # Additional paths to look for mozharness configs in. These should be
            # relative to the base of the source checkout
            Optional("config-paths"): [str],
            # if true, perform a checkout of a comm-central based branch inside the
            # gecko checkout
            Optional("comm-checkout"): bool,
        },
        # Override the default priority for the project
        Optional("priority"): task_description_schema["priority"],
    }
)

transforms = TransformSequence()
Ejemplo n.º 7
0
)
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()
transforms.add_validate(balrog_description_schema)

Ejemplo n.º 8
0
Transform the release-generate-checksums-signing task into task description.
"""

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.scriptworker import get_signing_cert_scope
from gecko_taskgraph.util.taskcluster import get_artifact_path
from gecko_taskgraph.transforms.task import task_description_schema
from voluptuous import Optional

release_generate_checksums_signing_schema = schema.extend({
    Optional("label"):
    str,
    Optional("treeherder"):
    task_description_schema["treeherder"],
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
    Optional("shipping-phase"):
    task_description_schema["shipping-phase"],
})

transforms = TransformSequence()
transforms.add_validate(release_generate_checksums_signing_schema)


@transforms.add
def make_release_generate_checksums_signing_description(config, jobs):
    for job in jobs:
        dep_job = job["primary-dependency"]
        attributes = copy_attributes_from_dependent_job(dep_job)
Ejemplo n.º 9
0
    get_beetmover_action_scope,
)
from gecko_taskgraph.util.treeherder import replace_group

transforms = TransformSequence()

beetmover_description_schema = schema.extend({
    # 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"],
    # locale is passed only for l10n beetmoving
    Optional("locale"):
    str,
    Required("shipping-phase"):
    task_description_schema["shipping-phase"],
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
    Optional("attributes"):
    task_description_schema["attributes"],
})

transforms.add_validate(beetmover_description_schema)


@transforms.add
def make_task_description(config, jobs):
Ejemplo n.º 10
0
packaging_description_schema = schema.extend(
    {
        # unique label to describe this repackaging task
        Optional("label"): str,
        Optional("worker-type"): str,
        Optional("worker"): object,
        # treeherder is allowed here to override any defaults we use for repackaging.  See
        # taskcluster/gecko_taskgraph/transforms/task.py for the schema details, and the
        # 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",
                "shipping-product",
                str,
            ),
            Optional("publisher"): optionally_keyed_by(
                "package-format",
                "level",
                "build-platform",
                "release-type",
                "shipping-product",
                str,
            ),
            Optional("publisher-display-name"): optionally_keyed_by(
                "package-format",
                "level",
                "build-platform",
                "release-type",
                "shipping-product",
                str,
            ),
        },
        # All l10n jobs use mozharness
        Required("mozharness"): {
            Extra: object,
            # Config files passed to the mozharness script
            Required("config"): optionally_keyed_by("build-platform", [str]),
            # Additional paths to look for mozharness configs in. These should be
            # relative to the base of the source checkout
            Optional("config-paths"): [str],
            # if true, perform a checkout of a comm-central based branch inside the
            # gecko checkout
            Optional("comm-checkout"): bool,
        },
    }
)
Ejemplo n.º 11
0
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"],
    }
)


@transforms.add
def set_label(config, jobs):
    for job in jobs:
        label = "push-langpacks-{}".format(job["primary-dependency"].label)
        job["label"] = label
Ejemplo n.º 12
0
from voluptuous import Any, Required, Optional

from collections import defaultdict
from copy import deepcopy

beetmover_description_schema = schema.extend({
    # depname is used in taskref's to identify the taskID of the unsigned things
    Required("depname", default="build"):
    str,
    # unique label to describe this beetmover task, defaults to {dep.label}-beetmover
    Optional("label"):
    str,
    Required("partner-bucket-scope"):
    optionally_keyed_by("release-level", str),
    Required("partner-public-path"):
    Any(None, str),
    Required("partner-private-path"):
    Any(None, str),
    Optional("extra"):
    object,
    Required("shipping-phase"):
    task_description_schema["shipping-phase"],
    Optional("shipping-product"):
    task_description_schema["shipping-product"],
    Optional("priority"):
    task_description_schema["priority"],
})

transforms = TransformSequence()
transforms.add_validate(beetmover_description_schema)
transforms.add(apply_partner_priority)
Ejemplo n.º 13
0
    get_geckoview_artifact_id,
)
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):