Command Line#

Interact with taskgraph

usage: taskgraph [-h]
                 {morphed,optimized,target-graph,target,full,tasks,build-image,load-image,image-digest,decision,action-callback,test-action-callback,init}
                 ...

Sub-commands#

morphed#

Show the morphed graph.

taskgraph morphed [-h] [-j MAX_WORKERS] [--diff [DIFF]] [-F] [-k TARGET_KINDS]
                  [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                  [-o OUTPUT_FILE] [--no-optimize]
                  [--force-local-files-changed] [--parameters PARAMETERS]
                  [--labels] [--yaml] [--json] [--verbose] [--quiet]
                  [--root ROOT]

Named Arguments#

-j, --max-workers

The maximum number of workers to use for parallel operations such aswhen multiple parameters files are passed.

--diff

Generate and diff the current taskgraph against another revision. Without args the base revision will be used. A revision specifier such as the hash or .~1 (hg) or HEAD~1 (git) can be used as well.

-F, --fast

enable fast task generation for local debugging.

Default: False

-k, --target-kind

only return tasks that are of the given kind, or their dependencies.

Default: []

--exclude-key

Exclude the specified key (using dot notation) from the final result. This is mainly useful with ‘–diff’ to filter out expected differences. Can be used multiple times.

--tasks-regex, --tasks

only return tasks with labels matching this regular expression.

-o, --output-file

file path to store generated output.

--no-optimize

do not remove tasks from the graph that are found in the index (a.k.a. optimize the graph)

Default: “true”

--force-local-files-changed

Compute the ‘files-changed’ parameter from local version control, even when explicitly using a parameter set that already has it defined. Note that this is already the default behaviour when no parameters are specified.

Default: False

--parameters, -p

Parameters to use for the generation. Can be a path to file (.yml or .json; see taskcluster/docs/parameters.rst), a directory (containing parameters files), a url, of the form project=mozilla-central to download latest parameters file for the specified project from CI, or of the form task-id=<decision task id> to download parameters from the specified decision task. Can be specified multiple times, in which case multiple generations will happen from the same invocation (one per parameters specified).

--labels, -L

Output the label for each task in the task graph (default)

--yaml, -Y

Output task graph as a YAML object

--json, -J

Output task graph as a JSON object

--verbose, -v

include debug-level logging output

Default: False

--quiet, -q

suppress all logging output

Default: False

--root, -r

root of the taskgraph definition relative to topsrcdir

optimized#

Show the optimized graph.

taskgraph optimized [-h] [-j MAX_WORKERS] [--diff [DIFF]] [-F]
                    [-k TARGET_KINDS] [--exclude-key EXCLUDE_KEYS]
                    [--tasks-regex TASKS_REGEX] [-o OUTPUT_FILE]
                    [--no-optimize] [--force-local-files-changed]
                    [--parameters PARAMETERS] [--labels] [--yaml] [--json]
                    [--verbose] [--quiet] [--root ROOT]

Named Arguments#

-j, --max-workers

The maximum number of workers to use for parallel operations such aswhen multiple parameters files are passed.

--diff

Generate and diff the current taskgraph against another revision. Without args the base revision will be used. A revision specifier such as the hash or .~1 (hg) or HEAD~1 (git) can be used as well.

-F, --fast

enable fast task generation for local debugging.

Default: False

-k, --target-kind

only return tasks that are of the given kind, or their dependencies.

Default: []

--exclude-key

Exclude the specified key (using dot notation) from the final result. This is mainly useful with ‘–diff’ to filter out expected differences. Can be used multiple times.

--tasks-regex, --tasks

only return tasks with labels matching this regular expression.

-o, --output-file

file path to store generated output.

--no-optimize

do not remove tasks from the graph that are found in the index (a.k.a. optimize the graph)

Default: “true”

--force-local-files-changed

Compute the ‘files-changed’ parameter from local version control, even when explicitly using a parameter set that already has it defined. Note that this is already the default behaviour when no parameters are specified.

Default: False

--parameters, -p

Parameters to use for the generation. Can be a path to file (.yml or .json; see taskcluster/docs/parameters.rst), a directory (containing parameters files), a url, of the form project=mozilla-central to download latest parameters file for the specified project from CI, or of the form task-id=<decision task id> to download parameters from the specified decision task. Can be specified multiple times, in which case multiple generations will happen from the same invocation (one per parameters specified).

--labels, -L

Output the label for each task in the task graph (default)

--yaml, -Y

Output task graph as a YAML object

--json, -J

Output task graph as a JSON object

--verbose, -v

include debug-level logging output

Default: False

--quiet, -q

suppress all logging output

Default: False

--root, -r

root of the taskgraph definition relative to topsrcdir

target-graph#

Show the target graph.

taskgraph target-graph [-h] [-j MAX_WORKERS] [--diff [DIFF]] [-F]
                       [-k TARGET_KINDS] [--exclude-key EXCLUDE_KEYS]
                       [--tasks-regex TASKS_REGEX] [-o OUTPUT_FILE]
                       [--no-optimize] [--force-local-files-changed]
                       [--parameters PARAMETERS] [--labels] [--yaml] [--json]
                       [--verbose] [--quiet] [--root ROOT]

Named Arguments#

-j, --max-workers

The maximum number of workers to use for parallel operations such aswhen multiple parameters files are passed.

--diff

Generate and diff the current taskgraph against another revision. Without args the base revision will be used. A revision specifier such as the hash or .~1 (hg) or HEAD~1 (git) can be used as well.

-F, --fast

enable fast task generation for local debugging.

Default: False

-k, --target-kind

only return tasks that are of the given kind, or their dependencies.

Default: []

--exclude-key

Exclude the specified key (using dot notation) from the final result. This is mainly useful with ‘–diff’ to filter out expected differences. Can be used multiple times.

--tasks-regex, --tasks

only return tasks with labels matching this regular expression.

-o, --output-file

file path to store generated output.

--no-optimize

do not remove tasks from the graph that are found in the index (a.k.a. optimize the graph)

Default: “true”

--force-local-files-changed

Compute the ‘files-changed’ parameter from local version control, even when explicitly using a parameter set that already has it defined. Note that this is already the default behaviour when no parameters are specified.

Default: False

--parameters, -p

Parameters to use for the generation. Can be a path to file (.yml or .json; see taskcluster/docs/parameters.rst), a directory (containing parameters files), a url, of the form project=mozilla-central to download latest parameters file for the specified project from CI, or of the form task-id=<decision task id> to download parameters from the specified decision task. Can be specified multiple times, in which case multiple generations will happen from the same invocation (one per parameters specified).

--labels, -L

Output the label for each task in the task graph (default)

--yaml, -Y

Output task graph as a YAML object

--json, -J

Output task graph as a JSON object

--verbose, -v

include debug-level logging output

Default: False

--quiet, -q

suppress all logging output

Default: False

--root, -r

root of the taskgraph definition relative to topsrcdir

target#

Show the set of target tasks.

taskgraph target [-h] [-j MAX_WORKERS] [--diff [DIFF]] [-F] [-k TARGET_KINDS]
                 [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                 [-o OUTPUT_FILE] [--no-optimize]
                 [--force-local-files-changed] [--parameters PARAMETERS]
                 [--labels] [--yaml] [--json] [--verbose] [--quiet]
                 [--root ROOT]

Named Arguments#

-j, --max-workers

The maximum number of workers to use for parallel operations such aswhen multiple parameters files are passed.

--diff

Generate and diff the current taskgraph against another revision. Without args the base revision will be used. A revision specifier such as the hash or .~1 (hg) or HEAD~1 (git) can be used as well.

-F, --fast

enable fast task generation for local debugging.

Default: False

-k, --target-kind

only return tasks that are of the given kind, or their dependencies.

Default: []

--exclude-key

Exclude the specified key (using dot notation) from the final result. This is mainly useful with ‘–diff’ to filter out expected differences. Can be used multiple times.

--tasks-regex, --tasks

only return tasks with labels matching this regular expression.

-o, --output-file

file path to store generated output.

--no-optimize

do not remove tasks from the graph that are found in the index (a.k.a. optimize the graph)

Default: “true”

--force-local-files-changed

Compute the ‘files-changed’ parameter from local version control, even when explicitly using a parameter set that already has it defined. Note that this is already the default behaviour when no parameters are specified.

Default: False

--parameters, -p

Parameters to use for the generation. Can be a path to file (.yml or .json; see taskcluster/docs/parameters.rst), a directory (containing parameters files), a url, of the form project=mozilla-central to download latest parameters file for the specified project from CI, or of the form task-id=<decision task id> to download parameters from the specified decision task. Can be specified multiple times, in which case multiple generations will happen from the same invocation (one per parameters specified).

--labels, -L

Output the label for each task in the task graph (default)

--yaml, -Y

Output task graph as a YAML object

--json, -J

Output task graph as a JSON object

--verbose, -v

include debug-level logging output

Default: False

--quiet, -q

suppress all logging output

Default: False

--root, -r

root of the taskgraph definition relative to topsrcdir

full#

Show the full taskgraph.

taskgraph full [-h] [-j MAX_WORKERS] [--diff [DIFF]] [-F] [-k TARGET_KINDS]
               [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
               [-o OUTPUT_FILE] [--no-optimize] [--force-local-files-changed]
               [--parameters PARAMETERS] [--labels] [--yaml] [--json]
               [--verbose] [--quiet] [--root ROOT]

Named Arguments#

-j, --max-workers

The maximum number of workers to use for parallel operations such aswhen multiple parameters files are passed.

--diff

Generate and diff the current taskgraph against another revision. Without args the base revision will be used. A revision specifier such as the hash or .~1 (hg) or HEAD~1 (git) can be used as well.

-F, --fast

enable fast task generation for local debugging.

Default: False

-k, --target-kind

only return tasks that are of the given kind, or their dependencies.

Default: []

--exclude-key

Exclude the specified key (using dot notation) from the final result. This is mainly useful with ‘–diff’ to filter out expected differences. Can be used multiple times.

--tasks-regex, --tasks

only return tasks with labels matching this regular expression.

-o, --output-file

file path to store generated output.

--no-optimize

do not remove tasks from the graph that are found in the index (a.k.a. optimize the graph)

Default: “true”

--force-local-files-changed

Compute the ‘files-changed’ parameter from local version control, even when explicitly using a parameter set that already has it defined. Note that this is already the default behaviour when no parameters are specified.

Default: False

--parameters, -p

Parameters to use for the generation. Can be a path to file (.yml or .json; see taskcluster/docs/parameters.rst), a directory (containing parameters files), a url, of the form project=mozilla-central to download latest parameters file for the specified project from CI, or of the form task-id=<decision task id> to download parameters from the specified decision task. Can be specified multiple times, in which case multiple generations will happen from the same invocation (one per parameters specified).

--labels, -L

Output the label for each task in the task graph (default)

--yaml, -Y

Output task graph as a YAML object

--json, -J

Output task graph as a JSON object

--verbose, -v

include debug-level logging output

Default: False

--quiet, -q

suppress all logging output

Default: False

--root, -r

root of the taskgraph definition relative to topsrcdir

tasks#

Show all tasks in the taskgraph.

taskgraph tasks [-h] [-j MAX_WORKERS] [--diff [DIFF]] [-F] [-k TARGET_KINDS]
                [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                [-o OUTPUT_FILE] [--no-optimize] [--force-local-files-changed]
                [--parameters PARAMETERS] [--labels] [--yaml] [--json]
                [--verbose] [--quiet] [--root ROOT]

Named Arguments#

-j, --max-workers

The maximum number of workers to use for parallel operations such aswhen multiple parameters files are passed.

--diff

Generate and diff the current taskgraph against another revision. Without args the base revision will be used. A revision specifier such as the hash or .~1 (hg) or HEAD~1 (git) can be used as well.

-F, --fast

enable fast task generation for local debugging.

Default: False

-k, --target-kind

only return tasks that are of the given kind, or their dependencies.

Default: []

--exclude-key

Exclude the specified key (using dot notation) from the final result. This is mainly useful with ‘–diff’ to filter out expected differences. Can be used multiple times.

--tasks-regex, --tasks

only return tasks with labels matching this regular expression.

-o, --output-file

file path to store generated output.

--no-optimize

do not remove tasks from the graph that are found in the index (a.k.a. optimize the graph)

Default: “true”

--force-local-files-changed

Compute the ‘files-changed’ parameter from local version control, even when explicitly using a parameter set that already has it defined. Note that this is already the default behaviour when no parameters are specified.

Default: False

--parameters, -p

Parameters to use for the generation. Can be a path to file (.yml or .json; see taskcluster/docs/parameters.rst), a directory (containing parameters files), a url, of the form project=mozilla-central to download latest parameters file for the specified project from CI, or of the form task-id=<decision task id> to download parameters from the specified decision task. Can be specified multiple times, in which case multiple generations will happen from the same invocation (one per parameters specified).

--labels, -L

Output the label for each task in the task graph (default)

--yaml, -Y

Output task graph as a YAML object

--json, -J

Output task graph as a JSON object

--verbose, -v

include debug-level logging output

Default: False

--quiet, -q

suppress all logging output

Default: False

--root, -r

root of the taskgraph definition relative to topsrcdir

build-image#

Build a Docker image

taskgraph build-image [-h] [--context-only context.tar] [-t name:tag]
                      image_name

Positional Arguments#

image_name

Name of the image to build

Named Arguments#

--context-only

File name the context tarball should be written to.with this option it will only build the context.tar.

-t, --tag

tag that the image should be built as.

load-image#

Load a pre-built Docker image. Note that you need to have docker installed and running for this to work.

taskgraph load-image [-h] [-t name:tag] [--task-id TASK_ID] [image_name]

Positional Arguments#

image_name

Load the image of this name based on the current contents of the tree (as built for mozilla-central or mozilla-inbound)

Named Arguments#

-t, --tag

tag that the image should be loaded as. If not image will be loaded with tag from the tarball

--task-id

Load the image at public/image.tar.zst in this task, rather than searching the index

image-digest#

Print the digest of a docker image.

taskgraph image-digest [-h] image_name

Positional Arguments#

image_name

Print the digest of the image of this name based on the current contents of the tree.

decision#

Run the decision task

taskgraph decision [-h] [--try-task-config-file TRY_TASK_CONFIG_FILE]
                   --tasks-for TASKS_FOR [--head-tag HEAD_TAG] --head-rev
                   HEAD_REV --head-ref HEAD_REF --head-repository
                   HEAD_REPOSITORY [--base-rev BASE_REV] [--base-ref BASE_REF]
                   --base-repository BASE_REPOSITORY --repository-type
                   REPOSITORY_TYPE [--target-tasks-method TARGET_TASKS_METHOD]
                   --level LEVEL --owner OWNER --pushdate PUSHDATE
                   --pushlog-id PUSHLOG_ID --project PROJECT [--root ROOT]

Named Arguments#

--try-task-config-file

path to try task configuration file

--tasks-for

the tasks_for value used to generate this task

--head-tag

Tag attached to the revision

Default: “”

--head-rev

Commit revision to use from head repository

--head-ref

Reference (this is same as rev usually for hg)

--head-repository

URL for “head” repository to fetch revision from

--base-rev

Taskgraph decides what to do based on the revision range between –base-rev and –head-rev. Value is determined automatically if not provided

Default: “”

--base-ref

Reference of the revision in the “base” repository

Default: “”

--base-repository

URL for “base” repository to clone

--repository-type

Type of repository, either “hg” or “git”

--target-tasks-method

method for selecting the target tasks to generate

--level

SCM level of this repository

--owner

email address of who owns this graph

--pushdate

Default: 0

--pushlog-id

Default: “0”

--project

Project to use for creating task graph. Example: –project=try

--root, -r

root of the taskgraph definition relative to topsrcdir

action-callback#

Run action callback used by action tasks

taskgraph action-callback [-h] [--root ROOT]

Named Arguments#

--root, -r

root of the taskgraph definition relative to topsrcdir

Default: “taskcluster”

test-action-callback#

Run an action callback in a testing mode

taskgraph test-action-callback [-h] [--input INPUT]
                               [--task-group-id TASK_GROUP_ID]
                               [--task-id TASK_ID] [--parameters PARAMETERS]
                               [--root ROOT]
                               callback

Positional Arguments#

callback

Action callback name (Python function name)

Named Arguments#

--input

Action input (.yml or .json)

--task-group-id

TaskGroupId to which the action applies

--task-id

TaskId to which the action applies

--parameters, -p

parameters file (.yml or .json; see taskcluster/docs/parameters.rst)`

Default: “”

--root, -r

root of the taskgraph definition relative to topsrcdir

Default: “taskcluster”

init#

Initialize a new Taskgraph setup in a new or existing project.

taskgraph init [-h] [--prompt] [-f]

Named Arguments#

--prompt

Prompt for input rather than using default values (advanced).

Default: True

-f, --force

Bypass safety checks.

Default: False