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}
                 ...

Sub-commands:

morphed

Show the morphed graph.

taskgraph morphed [-h] [--diff [DIFF]] [-F] [--target-kind TARGET_KIND]
                  [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                  [-o OUTPUT_FILE] [--no-optimize] [--parameters PARAMETERS]
                  [--labels] [--yaml] [--json] [--verbose] [--quiet]
                  [--root ROOT]

Named Arguments

--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

--target-kind

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

--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”

--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] [--diff [DIFF]] [-F] [--target-kind TARGET_KIND]
                    [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                    [-o OUTPUT_FILE] [--no-optimize] [--parameters PARAMETERS]
                    [--labels] [--yaml] [--json] [--verbose] [--quiet]
                    [--root ROOT]

Named Arguments

--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

--target-kind

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

--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”

--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] [--diff [DIFF]] [-F] [--target-kind TARGET_KIND]
                       [--exclude-key EXCLUDE_KEYS]
                       [--tasks-regex TASKS_REGEX] [-o OUTPUT_FILE]
                       [--no-optimize] [--parameters PARAMETERS] [--labels]
                       [--yaml] [--json] [--verbose] [--quiet] [--root ROOT]

Named Arguments

--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

--target-kind

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

--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”

--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] [--diff [DIFF]] [-F] [--target-kind TARGET_KIND]
                 [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                 [-o OUTPUT_FILE] [--no-optimize] [--parameters PARAMETERS]
                 [--labels] [--yaml] [--json] [--verbose] [--quiet]
                 [--root ROOT]

Named Arguments

--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

--target-kind

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

--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”

--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] [--diff [DIFF]] [-F] [--target-kind TARGET_KIND]
               [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
               [-o OUTPUT_FILE] [--no-optimize] [--parameters PARAMETERS]
               [--labels] [--yaml] [--json] [--verbose] [--quiet]
               [--root ROOT]

Named Arguments

--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

--target-kind

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

--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”

--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] [--diff [DIFF]] [-F] [--target-kind TARGET_KIND]
                [--exclude-key EXCLUDE_KEYS] [--tasks-regex TASKS_REGEX]
                [-o OUTPUT_FILE] [--no-optimize] [--parameters PARAMETERS]
                [--labels] [--yaml] [--json] [--verbose] [--quiet]
                [--root ROOT]

Named Arguments

--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

--target-kind

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

--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”

--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-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-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/ci”

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/ci”