qacli validate build
Run an analysis and upload the results to Validate as part of a server build.
Usage
validate build -P <directory> [-b <build-name>] [-j <n>] [-I] [--retry <n>] [-o <output-path>] [-T] [-s] [--force-complete] [-c] [--tags <tag[,tag...]>] [-m] [-i] [--] [-h]
Extended Description
This command enables you to run an analysis of a connected project in a server environment. It will perform an analysis and upload to Validate all the diagnostics. It may be used standalone or together with the qacli validate cibuild command.
Prerequisites for using server builds are:
- A valid server build license
- The project must be a connected project
Options
Name, shorthand | Default | Description |
---|---|---|
‑‑build‑name, ‑b <build-name>
|
Specify the build name to be used when uploading to Validate. If no name is specified, then a default will be used with the name based upon an incrementing upload count. |
|
‑‑clean, ‑c
|
Cleans all analysis data from the specified qaf-project before performing analysis. | |
‑‑disable‑metrics, ‑m
|
Disable the upload of metrics. | |
‑‑force‑complete
|
Forces the analysis to process all of the files, even in the event of a process level error that would lead to premature termination (such as a license check failure).
Mutually exclusive with |
|
‑‑help, ‑h
|
Displays usage information and exits. | |
‑‑ignore‑rest, ‑‑ |
Ignores the rest of the labeled arguments following this flag. | |
‑‑ignore, ‑i
|
Ignore project and file checks, including dependency checking when uploading to Validate. The resultant upload may not be 100% complete and accurate. | |
‑‑inter‑tu‑dataflow, ‑I |
Perform Inter TU Dataflow analysis. | |
‑‑jobs, ‑j <n>
|
Specify the maximum number of jobs to run in parallel during analysis. This optional parameter temporarily overrides any previously set value
(qacli config cpu ‑‑set <jobs> ) and the system default (usually the number of cores - 1).
|
|
‑‑output‑progress, ‑o
|
Specify that analysis progress will be piped to the given file. | |
‑‑qaf-project <directory>, ‑P <directory>
|
(Required) Specify a path to a valid Helix QAC project to act upon. |
|
‑‑retry <n>
|
3 | If analysis fails due to a license failure or the parser returns an unexpected return code then wait a short period and retry up to 'n' times. By default 3 retries are attempted. This feature can be disabled by specifying a retry value of 0. |
‑‑show‑timings, ‑T
|
Show analysis timing information, in the format ([nd ]HH:MM:SS). Where 'nd ' is the number of days - this is only shown if greater than zero. | |
‑‑stop‑on‑fail, ‑s
|
Halts analysis once the first analysis failure is encountered. Mutually exclusive with |
|
‑‑tags
|
Add comma separated tags to the project that is uploaded to the Validate portal. Individual tags can be a maximum of 128 characters and the maximum size of the total tags option is 256 characters. Tags can contain spaces, but not at the start or end of a tag. |
Examples
Setup a Server Build
The following example shows the steps you need to perform with qacli to setup and execute a server build. It is assumed that you will have fetched your source code prior to performing static analysis and an existing Helix QAC project has previously been connected and uploaded to Validate.
First, authenticate with the Validate server if you have not already done so:
After this, fetch the project from Validate:
qacli validate config --create -P <project_dir> --url <validate_url> --validate-project <validate_project_name>
Make sure that the Helix QAC project is up to date with any file additions, removals, or renames by synchronizing with the source.
For example:
This will quickly bring the Helix QAC project up to date based on the content of the JSON compilation database used to build the source.
Refer to the “Project Synchronization” section for details.
You are now ready to perform the server build.
Perform a Server Build
This will analyze the project and upload the results to Validate.
New results will be uploaded the Validate server – a default build name will be allocated.
After the build has completed successfully (and only if successful) you should update the project configuration on Validate with any files that were added/removed:
Upload Diagnostics to Validate Including Tags
To upload Helix QAC diagnostics to Validate and add tags and a build name to the build: