Synopsis

fcli tool fod-uploader install [-y] [--[no-]global-bin] [--on-digest-mismatch=<onDigestMismatch>] [-p=<platform>] [--progress=<type>] [-v=<version>] [-u=<versionsToUninstall>[, <versionsToUninstall>…​]]…​ [[-h] [--env-prefix=<envPrefix>] [--log-file=<logFile>] [--log-level=<logLevel>]] [-d=<installDir> | -b=<baseDir>] ] [--store=_variableName _ ] [--to-file=<outputFile>_]]

Description

This command allows for tool installation and upgrade. All tools are installed to <base-dir>/<tool-name>/<version>. The base directory can be specified using the --base-dir option, defaulting to <user.home>/fortify/tools if not specified. Unless the --no-global-bin option is specified, wrapper scripts for invoking each tool will be installed to <base-dir>/bin, allowing users to add this directory to the system PATH for easy tool invocations.

When installing a new version, older versions can optionally be automatically un-installed using the --uninstall option, which is basically the equivalent of an upgrade. When trying to install a version that’s already been installed, only some post-installation tasks will be re-run, like installing the global bin scripts and performing any tool configuration if applicable.

Sample invocations:

Install latest tool version, keep older versions: fcli tool <name> install -v latest

Install latest tool version (only re-running post-install if already existing), uninstall all other tool versions: fcli tool <name> install -v latest --uninstall all

Install latest v2 version, uninstall all other v2 versions: fcli tool <name> install -v 2 --uninstall 2

Install latest and latest v1, have global bin-scripts point to latest: fcli tool <name> install -v latest fcli tool <name> install -v 1 --no-global-bin

Options

-b, --base-dir=<baseDir>

Directory under which the tool will be installed. Defaults to ~/fortify. Tools will be installed to <base-dir>/<tool>/<version>.

-d, --install-dir=<installDir>

Tool installation directory. Deprecated, use --base-dir instead.

--[no-]global-bin

By default, wrapper scripts will be installed to <base-dir>/bin; use --no-global-bin to skip installing/updating these wrapper scripts.

--on-digest-mismatch=<onDigestMismatch>

Action to take if there is a digest mismatch. Allowed values: fail, warn. Default action is to fail.

-p, --platform=<platform>

By default, fcli will try to install tool binaries that match the current operating system & architecture. Use this option to override automatic platform detection. The list-platforms command lists available platforms.

--progress=<type>

Configure progress output. Allowed values: auto, none, simple, stderr, single-line, ansi. Default value: auto. Proper output of single-line and ansi depends on console capabilities.

-u, --uninstall=<versionsToUninstall>[,<versionsToUninstall>…​]

Uninstall the given versions while installing the new version. Accepts 'all' to uninstall all existing versions, or a comma-separated list of version numbers. Version numbers may be specified as <major>[.<minor>[.<patch>]].

-v, --version=<version>

Tool version to install; see output of list command to view available versions. Default value: latest

-y, --confirm

Automatically confirm all prompts (cleaning the target directory, uninstalling other versions).

Output options

-o, --output=format[=<options>]

Specify output format and options. Available output formats: csv, csv-plain, json, json-flat, table, table-plain, tree, tree-flat, xml, xml-flat, yaml, yaml-flat, expr, json-properties. The 'expr' output format takes a string containing '{property}' placeholders, other output formats take an optional, comma-separated list of properties to include in the output. Use '-o json-properties' on the current command to see available properties.

--store=variableName[=<propertyNames>]

Store the JSON results of this command in a variable. Variables can be managed through the 'fcli util variable' command, and can be referenced using ::variable::[property] on any subsequent command.

--to-file=<outputFile>

Write command output to the specified file instead of stdout.

Generic fcli options

--env-prefix=<envPrefix>

Environment variable prefix for resolving default option and parameter values. Default value is FCLI_DEFAULT.

-h, --help

Show this help message and exit. Use 'fcli <command> -h' to display help for subcommands.

--log-file=<logFile>

File where logging data will be written. Defaults to fcli.log in current directory if --log-level is specified.

--log-level=<logLevel>

Set logging level. Note that DEBUG and TRACE levels may result in sensitive data being written to the log file. Allowed values: TRACE, DEBUG, INFO, WARN, ERROR.