How to use the taskgraph.transforms.job.configure_taskdesc_for_run 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 / job.py View on Github external
def configure_run_commands_schema(config, job, taskdesc):
    run = job["run"]
    pre_commands = [
        _generate_secret_command(secret) for secret in run.get("secrets", [])
    ]
    all_commands = pre_commands + run.pop("commands", [])

    run["command"] = _convert_commands_to_string(all_commands)
    _inject_secrets_scopes(run, taskdesc)
    _set_run_task_attributes(job)
    configure_taskdesc_for_run(config, job, taskdesc, job["worker"]["implementation"])
github mozilla-mobile / firefox-tv / taskcluster / firefox_tv_taskgraph / job.py View on Github external
run = job["run"]
    worker = taskdesc["worker"] = job["worker"]

    worker.setdefault("env", {}).update(
        {"ANDROID_SDK_ROOT": path.join(run["workdir"], "android-sdk-linux")}
    )

    # defer to the run_task implementation
    run["command"] = _extract_command(run)
    secrets = run.pop("secrets", [])
    scopes = taskdesc.setdefault("scopes", [])
    scopes.extend(["secrets:get:{}".format(secret(["name"]) for secret in secrets)])

    run["cwd"] = "{checkout}"
    run["using"] = "run-task"
    configure_taskdesc_for_run(config, job, taskdesc, job["worker"]["implementation"])
github mozilla-mobile / fenix / taskcluster / fenix_taskgraph / job.py View on Github external
def configure_gradlew(config, job, taskdesc):
    run = job["run"]
    worker = taskdesc["worker"] = job["worker"]

    worker.setdefault("env", {}).update(
        {"ANDROID_SDK_ROOT": path.join(run["workdir"], "android-sdk-linux")}
    )

    run["command"] = _extract_gradlew_command(run)
    _inject_secrets_scopes(run, taskdesc)
    _set_run_task_attributes(job)
    configure_taskdesc_for_run(config, job, taskdesc, job["worker"]["implementation"])