taskgraph.transforms.job package


taskgraph.transforms.job.common module

Common support for various job types. These functions are all named after the worker implementation they operate on, and take the same three parameters, for consistency.

taskgraph.transforms.job.common.add_artifacts(config, job, taskdesc, path)
taskgraph.transforms.job.common.add_cache(job, taskdesc, name, mount_point, skip_untrusted=False)

Adds a cache based on the worker’s implementation.

  • job (dict) – Task’s job description.

  • taskdesc (dict) – Target task description to modify.

  • name (str) – Name of the cache.

  • mount_point (path) – Path on the host to mount the cache.

  • skip_untrusted (bool) – Whether cache is used in untrusted environments (default: False). Only applies to docker-worker.

taskgraph.transforms.job.common.add_tooltool(config, job, taskdesc, internal=False)

Give the task access to tooltool.

Enables the tooltool cache. Adds releng proxy. Configures scopes.

By default, only public tooltool access will be granted. Access to internal tooltool can be enabled via internal=True.

This can only be used with run-task tasks, as the cache name is reserved for use with run-task.

taskgraph.transforms.job.common.docker_worker_add_artifacts(config, job, taskdesc)

Adds an artifact directory to the task

taskgraph.transforms.job.common.generic_worker_add_artifacts(config, job, taskdesc)

Adds an artifact directory to the task

taskgraph.transforms.job.common.generic_worker_hg_commands(base_repo, head_repo, head_rev, path, sparse_profile=None)

Obtain commands needed to obtain a Mercurial checkout on generic-worker.

Returns two command strings. One performs the checkout. Another logs.

taskgraph.transforms.job.common.setup_secrets(config, job, taskdesc)

Set up access to secrets via taskcluster-proxy. The value of run[‘secrets’] should be a boolean or a list of secret names that can be accessed.

taskgraph.transforms.job.common.support_vcs_checkout(config, job, taskdesc, sparse=False)

Update a job/task with parameters to enable a VCS checkout.

This can only be used with run-task tasks, as the cache name is reserved for run-task tasks.

taskgraph.transforms.job.debian_package module

Support for running spidermonkey jobs via dedicated scripts

taskgraph.transforms.job.debian_package.docker_worker_debian_package(config, job, taskdesc)

taskgraph.transforms.job.hazard module

Support for running hazard jobs via dedicated scripts

taskgraph.transforms.job.hazard.docker_worker_hazard(config, job, taskdesc)

taskgraph.transforms.job.mach module

Support for running mach tasks (via run-task)

taskgraph.transforms.job.mach.configure_mach(config, job, taskdesc)

taskgraph.transforms.job.mozharness module

Support for running jobs via mozharness. Ideally, most stuff gets run this way, and certainly anything using mozharness should use this approach.

taskgraph.transforms.job.mozharness.mozharness_on_docker_worker_setup(config, job, taskdesc)
taskgraph.transforms.job.mozharness.mozharness_on_generic_worker(config, job, taskdesc)

taskgraph.transforms.job.mozharness_test module

taskgraph.transforms.job.mozharness_test.mozharness_test_on_docker(config, job, taskdesc)
taskgraph.transforms.job.mozharness_test.mozharness_test_on_generic_worker(config, job, taskdesc)

Account for different platforms that name their test packages differently

taskgraph.transforms.job.python_test module

Support for running mach python-test tasks (via run-task)

taskgraph.transforms.job.python_test.configure_python_test(config, job, taskdesc)

taskgraph.transforms.job.run_task module

Support for running jobs that are invoked via the run-task script.

taskgraph.transforms.job.run_task.common_setup(config, job, taskdesc, command)
taskgraph.transforms.job.run_task.docker_worker_run_task(config, job, taskdesc)
taskgraph.transforms.job.run_task.generic_worker_run_task(config, job, taskdesc)
taskgraph.transforms.job.run_task.script_url(config, script)

taskgraph.transforms.job.spidermonkey module

Support for running spidermonkey jobs via dedicated scripts

taskgraph.transforms.job.spidermonkey.docker_worker_spidermonkey(config, job, taskdesc)
taskgraph.transforms.job.spidermonkey.generic_worker_spidermonkey(config, job, taskdesc)

taskgraph.transforms.job.toolchain module

Support for running toolchain-building jobs via dedicated scripts

taskgraph.transforms.job.toolchain.docker_worker_toolchain(config, job, taskdesc)
taskgraph.transforms.job.toolchain.get_digest_data(config, run, taskdesc)
taskgraph.transforms.job.toolchain.windows_toolchain(config, job, taskdesc)

Module contents

Convert a job description into a task description.

Jobs descriptions are similar to task descriptions, but they specify how to run the job at a higher level, using a “run” field that can be interpreted by run-using handlers in taskcluster/taskgraph/transforms/job.

taskgraph.transforms.job.add_resource_monitor(config, jobs)
taskgraph.transforms.job.always_optimized(config, job, taskdesc)
taskgraph.transforms.job.configure_taskdesc_for_run(config, job, taskdesc, worker_implementation)

Run the appropriate function for this job against the given task description.

This will raise an appropriate error if no function exists, or if the job’s run is not valid according to the schema.

taskgraph.transforms.job.get_attribute(dict, key, attributes, attribute_name)

Get attribute_name from the given attributes dict, and if there is a corresponding value, set key in dict to that value.

taskgraph.transforms.job.make_task_description(config, jobs)

Given a build description, create a task description

taskgraph.transforms.job.rewrite_when_to_optimization(config, jobs)
taskgraph.transforms.job.run_job_using(worker_implementation, run_using, schema=None, defaults={})

Register the decorated function as able to set up a task description for jobs with the given worker implementation and run.using property. If schema is given, the job’s run field will be verified to match it.

The decorated function should have the signature using_foo(config, job, taskdesc) and should modify the task description in-place. The skeleton of the task description is already set up, but without a payload.

taskgraph.transforms.job.set_implementation(config, jobs)
taskgraph.transforms.job.set_label(config, jobs)
taskgraph.transforms.job.use_fetches(config, jobs)