Synopsis
fcli fod mast-scan wait-for [--delim=<delimiter>] [-i=<intervalPeriod>] [--on-failure-state=<onFailureState>] [--on-timeout=<onTimeout>] [--on-unknown-state=<onUnknownState>] [--on-unknown-state-requested=<onUnknownStateRequest _ ed>_] [--progress=<type>] [-t=<timeoutPeriod>] [-s=<states>[,<states>…]]… [[-h] [--env-prefix=<envPrefix>] [--log-file=<logFile>] [--log-level=<logLevel>]] ] [--store=_variableName[:<propertyNames>]] [--to-file=<outputFile>]] [-u=any-match|all-match | -w=any-match|all-match] [[--session=<sessionName>]] scan-id’s…
Description
Although this command offers a lot of options to cover many different use cases, you can simply pass a scan id (possibly stored using --store on one of the 'scan start-*' commands) to wait for scan completion. If any error state or unknown state is detected, an exception will be thrown.
The following states are currently known by fcli: See fcli help output
Please note it is recommended to pass the scan id’s as '<release-id>:<scan-id>' rather than just '<scan-id>'. If only '<scan-id>' is passed then its status might not be available yet, causing FoD to return a '404 - Not Found' error. It is recommended to pass a fcli variable to do this as it will automatically resolve to using <release-id>:<scan-id>. For example, to start a SAST scan and wait for it to complete, use:
fcli fod sast-scan start ... --store scan fcli fod sast-scan wait-for ::scan::
Options
- --delim=<delimiter>
-
Change the default delimiter character when using options that accept "application[:microservice]:release" as an argument or parameter.
- -i, --interval=<intervalPeriod>
-
Polling interval, for example 5s (5 seconds) or 1m (1 minute).
- --on-failure-state=<onFailureState>
-
Action to take when a failure state is returned for any of the records: wait, terminate, fail.
- --on-timeout=<onTimeout>
-
Action to take when timeout occurs: terminate, fail.
- --on-unknown-state=<onUnknownState>
-
Action to take when an unknown state is returned for any of the records: wait, terminate, fail.
- --on-unknown-state-requested=<onUnknownStateRequested>
-
Action to take when an unknown state is passed in any of the --while or --until options: ignore, fail.
- --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.
- -s, --any-state=<states>[,<states>…]
-
One or more scan states against which to match the given scans.
- -t, --timeout=<timeoutPeriod>
-
Time-out, for example 30s (30 seconds), 5m (5 minutes), 1h (1 hour).
- -u, --until=any-match|all-match
-
Wait until either any or all scans match. If neither --until or --while are specified, default is to wait until all scans match.
- -w, --while=any-match|all-match
-
Wait while either any or all scans match.
Session options
- --session=<sessionName>
-
Name of the FoD session to use for executing this command. Default value: default.
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.