How to use the taskgraph.util.treeherder.inherit_treeherder_from_dep function in taskgraph

To help you get started, we’ve selected a few taskgraph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla-mobile / fenix / taskcluster / fenix_taskgraph / raptor.py View on Github external
for task in tasks:
        signing = task.pop("primary-dependency")
        task["dependencies"]["signing"] = signing.label
        build_type = task["attributes"]["build-type"]
        abi = task["attributes"]["abi"]
        apk = task["attributes"]["apk"]

        test_name = task.pop("test-name")

        task["name"] = "{}-{}-{}".format(task["name"], build_type, abi)
        task["description"] = "{}-{}".format(build_type, abi)

        for key in ("worker-type", "treeherder.platform"):
            resolve_keyed_by(task, key, item_name=task["name"], **{"abi": abi})

        task["treeherder"] = inherit_treeherder_from_dep(task, signing)

        extra_config = {
            "installer_url": "".format(apk),
            "test_packages_url": "",
        }
        env = task["worker"]["env"]
        env["EXTRA_MOZHARNESS_CONFIG"] = {
            "artifact-reference": json.dumps(extra_config, sort_keys=True)
        }
        env["GECKO_HEAD_REV"] = "default"
        env["MOZILLA_BUILD_URL"] = {"artifact-reference": "".format(apk)}
        env["MOZHARNESS_URL"] = {
            "artifact-reference": ""
        }
        env["TASKCLUSTER_WORKER_TYPE"] = task["worker-type"]
github mozilla-mobile / fenix / taskcluster / fenix_taskgraph / transforms / multi_dep.py View on Github external
def build_treeherder_definition(config, tasks):
    for task in tasks:
        dep = task.pop("primary-dependency")

        task.setdefault("treeherder", {}).update(inherit_treeherder_from_dep(task, dep))
        job_group = dep.task["extra"]["treeherder"].get("groupSymbol", "?")
        job_symbol = task["treeherder"].pop("job-symbol")
        full_symbol = join_symbol(job_group, job_symbol)
        task["treeherder"]["symbol"] = full_symbol

        yield task