Command Line

jolt build

Build task artifact.

TASK is the name of the task to execute. It is optionally followed by a colon and parameter value assignments. Assignments are separated by commas. Example:

taskname:param1=value1,param2=value2

Default parameter values can be overridden for any task in the dependency tree with –default. DEFAULT is a qualified task name, just like TASK, but parameter assignments change default values.

By default, a task is executed locally and the resulting artifact is stored in the local artifact cache. If an artifact is already available in the cache, no execution takes place. Artifacts are identified with a hash digest, constructed from hashing task attributes.

When remote cache providers are configured, artifacts may be downloaded from and/or uploaded to the remote cache as execution progresses. Several options exist to control the behavior, such as –local which disables all remote caches.

Distributed task execution is enabled by passing the –network option. Tasks are then distributed to and executed by a pool of workers, if one has been configured.

Rebuilds can be forced with either –force or –salt. –force rebuilds the requested task, but not its dependencies. –salt affects the entire dependency tree. Both add an extra attribute to the task hash calculation in order to taint the identity and induce a cache miss. In both cases, existing intermediate files in build directories are removed before execution starts.

jolt build [OPTIONS] [TASK]...

Options

-c, --copy <copy>

Copy artifact content to directory PATH.

-d, --default <DEFAULT>

Override default parameter values.

-f, --force

Force rebuild of TASK artifact.

-g, --debug

Start debug shell before executing TASK.

-j, --jobs <JOBS>

Number of tasks allowed to execute in parallel [1].

-k, --keep-going

Build as many task artifacts as possible.

-l, --local

Disable remote cache access.

-n, --network

Distribute tasks to network workers.

-s, --salt <SALT>

Add salt as hash influence for all tasks in dependency tree.

-m, --mute

Display task log only if it fails.

-v, --verbose

Verbose output (repeat to raise verbosity).

--no-download

Don’t download artifacts from remote storage

--no-upload

Don’t upload artifacts to remote storage

--download

Do download artifacts from remote storage

--upload

Do upload artifacts to remote storage

--no-prune

Don’t prune cached artifacts from the build graph. This option can be used to populate the local cache with remotely cached dependency artifacts.

Arguments

TASK

Optional argument(s)

jolt clean

Delete task artifacts and intermediate files.

When run without arguments, this command removes all task artifacts from the local cache, but no intermediate files are removed.

When TASK is specified, the task clean() method is invoked to remove any intermediate files still present in persistent build directories. Secondly, the task artifact will be removed from the local cache. Global caches are not affected. The –deps parameter can be used to also clean all dependencies of the specified TASK.

By default, task artifacts are removed without considering any artifact expiration metadata. To only remove artifact which have expired, use the –expired parameter. Artifacts typically expire immediately after creation unless explicitly configured not to.

jolt clean [OPTIONS] [TASK]...

Options

-d, --deps

Clean all task dependencies.

-e, --expired

Only clean expired tasks.

Arguments

TASK

Optional argument(s)

jolt config

Configure Jolt.

You can query/set/replace/unset configuration keys with this command. Key strings are constructed from the configuration section and the option separated by a dot.

There are tree different configuration sources:

  • A global configuration file

  • A user configuration file

  • Temporary configuration passed on the command line.

When reading, the values are read from all configuration sources. The options –global and –user can be used to tell the command to read from only one of the sources. If a configuration key is available from multiple sources, temporary CLI configuration has priority followed by the user configuration file and lastly the global configuration file.

When writing, the new values are written to the user configuration by default. The options –global and –user can be used to tell the command to write to only one of the sources.

When removing keys, the values are removed from all sources. The options –global and –user can be used to restrict removal to one of the sources.

To assign a value to a key:

$ jolt config jolt.default all # Change name of the default task

To list existing keys:

$ jolt config -l # List all existing keys

$ jolt config -l -g # List keys in the global config file

$ jolt config jolt.colors # Display the value of a key.

To delete an existing key:

$ jolt config -d jolt.colors

To pass temporary configuration:

$ jolt -c jolt.colors=true config -l

jolt config [OPTIONS] [KEY] [VALUE]

Options

-l, --list

List all configuration keys and values.

-d, --delete

Delete configuration key.

-g, --global

List, set or get configuration keys in the global config.

-u, --user

List, set or get configuration keys in the user config.

Arguments

KEY

Optional argument

VALUE

Optional argument

jolt display

Display a task and its dependencies visually.

jolt display [OPTIONS] [TASK]...

Options

-c, --cached

Highlight cache presence with colors.

-r, --reverse <reverse>

Display consumers of REVERSE if TASK is executed.

-p, --prune

Do not repeat tasks. An already visited task’s name is printed inside [square brackets] and its deps are omitted.

Arguments

TASK

Optional argument(s)

jolt docs

Opens the Jolt documentation in the default webbrowser.

jolt docs [OPTIONS]

jolt export

Export task artifact metadata into shell environment.

When running the command, a shell script is printed to stdout. It can be redirected to a file and executed separately, or sourced directly in the shell by running:

source <(jolt export <task>)

The script creates a virtual environment that is identical to the environment that would be setup when the specified task artifact is consumed by another task. This enables packaged applications, such as compilers, to be run directly from the shell.

The command will fail if the task artifact or any dependency artifact is missing in the local cache. Build the task to populate the cache and then try again.

Run deactivate-jolt to leave the virtual environment. All environment variables will be restored to their original values.

jolt export [OPTIONS] TASK...

Arguments

TASK

Required argument(s)

jolt inspect

View information about a task.

This command displays information about a task, such as its class documentation, parameters and their accepted values, requirements, task class origin (file/line), influence attributes, artifact identity, cache status, and more. Default parameter values, if any, are highlighted.

jolt inspect [OPTIONS] TASK

Options

-i, --influence

Print influence attributes and values.

-a, --artifact

Print artifact cache status.

-s, --salt <SALT>

Add salt as task influence.

Arguments

TASK

Required argument

jolt list

List all tasks, or dependencies of a task.

By default, when no TASK is specified, all known task names are listed in alphabetical order.

When a TASK is specified, only direct dependencies of that task are listed. Use -a to also list its indirect dependencies.

Multiple TASK names are allowed.

jolt list [OPTIONS] [TASK]...

Options

-a, --all

List all direct and indirect dependencies of TASK.

-r, --reverse <REVERSE>

Only list dependencies of TASK that are also reverse dependencies of REVERSE.

Arguments

TASK

Optional argument(s)

jolt log

Display the Jolt log file.

jolt log [OPTIONS]

Options

-f, --follow

Display log output as it appears

-d, --delete

Delete the log file

jolt report

Create and publish a report with system information and logs.

The purpose of the report command is to aid troubleshooting by providing users a method to quickly generate and share a report with information about the environment and previous activity.

The report is uploaded to remote caches if configured, otherwise a report archive is created in the current working directory.

jolt report [OPTIONS]