taskgraph.transforms.job package

Submodules

taskgraph.transforms.job.buildbot module

Support for running jobs via buildbot.

taskgraph.transforms.job.buildbot.bb_ci_worker(config, worker)
taskgraph.transforms.job.buildbot.bb_release_worker(config, worker, run)
taskgraph.transforms.job.buildbot.mozharness_on_buildbot_bridge(config, job, taskdesc)

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_public_artifacts(config, job, taskdesc, path)
taskgraph.transforms.job.common.docker_worker_add_gecko_vcs_env_vars(config, job, taskdesc)

Add the GECKO_BASE_* and GECKO_HEAD_* env vars to the worker.

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

Adds a public artifact directory to the task

taskgraph.transforms.job.common.docker_worker_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_workspace_cache(config, job, taskdesc, extra=None)

Add the workspace cache.

extra is an optional kwarg passed in that supports extending the cache key name to avoid undesired conflicts with other caches.

taskgraph.transforms.job.common.docker_worker_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.generic_worker_add_public_artifacts(config, job, taskdesc)

Adds a public artifact directory to the task

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.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.docker_worker_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_buildbot_bridge(config, job, taskdesc)
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.get_variant(test_platform)
taskgraph.transforms.job.mozharness_test.mozharness_test_buildbot_bridge(config, job, taskdesc)
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)
taskgraph.transforms.job.mozharness_test.mozharness_test_on_native_engine(config, job, taskdesc)
taskgraph.transforms.job.mozharness_test.test_packages_url(taskdesc)

Account for different platforms that name their test packages differently

taskgraph.transforms.job.run_task module

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

taskgraph.transforms.job.run_task.add_checkout_to_command(run, command)
taskgraph.transforms.job.run_task.common_setup(config, job, taskdesc)
taskgraph.transforms.job.run_task.docker_worker_run_task(config, job, taskdesc)
taskgraph.transforms.job.run_task.native_engine_run_task(config, job, taskdesc)

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.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.import_all()

Import all modules that are siblings of this one, triggering the decorator above in the process.

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)

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.validate(config, jobs)