gecko_taskgraph.transforms.job package¶
Submodules¶
gecko_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.
- gecko_taskgraph.transforms.job.common.add_artifacts(config, job, taskdesc, path)¶
- gecko_taskgraph.transforms.job.common.add_cache(job, taskdesc, name, mount_point, skip_untrusted=False)¶
Adds a cache based on the worker’s implementation.
- Parameters
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.
- gecko_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 withrun-task
.
- gecko_taskgraph.transforms.job.common.docker_worker_add_artifacts(config, job, taskdesc)¶
Adds an artifact directory to the task
- gecko_taskgraph.transforms.job.common.generic_worker_add_artifacts(config, job, taskdesc)¶
Adds an artifact directory to the task
- gecko_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.
- gecko_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.
- gecko_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 forrun-task
tasks.
gecko_taskgraph.transforms.job.distro_package module¶
Support for running spidermonkey jobs via dedicated scripts
- gecko_taskgraph.transforms.job.distro_package.common_package(config, job, taskdesc, distro, version)¶
- gecko_taskgraph.transforms.job.distro_package.docker_worker_debian_package(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.distro_package.docker_worker_ubuntu_package(config, job, taskdesc)¶
gecko_taskgraph.transforms.job.hazard module¶
Support for running hazard jobs via dedicated scripts
- gecko_taskgraph.transforms.job.hazard.docker_worker_hazard(config, job, taskdesc)¶
gecko_taskgraph.transforms.job.mach module¶
Support for running mach tasks (via run-task)
- gecko_taskgraph.transforms.job.mach.configure_mach(config, job, taskdesc)¶
gecko_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.
- gecko_taskgraph.transforms.job.mozharness.mozharness_on_docker_worker_setup(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.mozharness.mozharness_on_generic_worker(config, job, taskdesc)¶
gecko_taskgraph.transforms.job.mozharness_test module¶
- gecko_taskgraph.transforms.job.mozharness_test.get_variant(test_platform)¶
- gecko_taskgraph.transforms.job.mozharness_test.installer_url(taskdesc)¶
- gecko_taskgraph.transforms.job.mozharness_test.mozharness_test_on_docker(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.mozharness_test.mozharness_test_on_generic_worker(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.mozharness_test.test_packages_url(taskdesc)¶
Account for different platforms that name their test packages differently
gecko_taskgraph.transforms.job.python_test module¶
Support for running mach python-test tasks (via run-task)
- gecko_taskgraph.transforms.job.python_test.configure_python_test(config, job, taskdesc)¶
gecko_taskgraph.transforms.job.run_task module¶
Support for running jobs that are invoked via the run-task script.
- gecko_taskgraph.transforms.job.run_task.common_setup(config, job, taskdesc, command)¶
- gecko_taskgraph.transforms.job.run_task.docker_worker_run_task(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.run_task.generic_worker_run_task(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.run_task.script_url(config, script)¶
gecko_taskgraph.transforms.job.spidermonkey module¶
Support for running spidermonkey jobs via dedicated scripts
- gecko_taskgraph.transforms.job.spidermonkey.docker_worker_spidermonkey(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.spidermonkey.generic_worker_spidermonkey(config, job, taskdesc)¶
gecko_taskgraph.transforms.job.toolchain module¶
Support for running toolchain-building jobs via dedicated scripts
- gecko_taskgraph.transforms.job.toolchain.common_toolchain(config, job, taskdesc, is_docker)¶
- gecko_taskgraph.transforms.job.toolchain.docker_worker_toolchain(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.toolchain.generic_worker_toolchain(config, job, taskdesc)¶
- gecko_taskgraph.transforms.job.toolchain.get_digest_data(config, run, 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/gecko_taskgraph/transforms/job.
- gecko_taskgraph.transforms.job.add_resource_monitor(config, jobs)¶
- gecko_taskgraph.transforms.job.always_optimized(config, job, taskdesc)¶
- gecko_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.
- gecko_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.
- gecko_taskgraph.transforms.job.make_task_description(config, jobs)¶
Given a build description, create a task description
- gecko_taskgraph.transforms.job.rewrite_when_to_optimization(config, jobs)¶
- gecko_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.
- gecko_taskgraph.transforms.job.set_implementation(config, jobs)¶
- gecko_taskgraph.transforms.job.set_label(config, jobs)¶
- gecko_taskgraph.transforms.job.use_fetches(config, jobs)¶