qacli upload

Upload the Helix QAC analysis results to an external server.

Usage

upload {-q|-D|-V|-s|-g <output-file>} [-P <directory>] [-K <config name>] [--username <username>] [-p <password>] [-w <password-file>] [-t <token>] [-r <directory>] [-v <file>] [-j <n>] [--upload-project <project>] [-u <directory>] [--upload-source <NONE|ALL|NOT_IN_VCS>] [-a <ROOT|RELATIVE|ABSOLUTE>] [-S <snapshot>] [--snapshot-parent <parent>] [-U <[protocol://]host:port>] [-F <file>] [-m] [-i] [-b <Validate project/stream>] [--tags <tag[,tag...]>] [--] [-h] <source-file>

Extended Description

The Helix QAC analysis results may be uploaded to an external application where further analysis may be performed such as defect trend analysis, code structure/complexity analysis etc. Several different targets are currently supported:

  • Perforce Validate: Validate by Perforce is our web interface for project management, reporting, issue management and user management.
  • Helix QAC Dashboard: The legacy Helix QAC Dashboard is a centralized store of analysis results, accessed through a web browser. Results are uploaded to the dashboard as ‘snapshots’. Customized views and reports mean that project code quality and compliance metrics can be monitored over time.
  • structure101: Visualization of the structure of the source code.

Options

Name, shorthand Default Description
‑‑config, ‑K   For projects with multiple configurations, specify which configuration to use. If none specified, then the default will be used.
‑‑dashboard, ‑D   Specify to upload results to Dashboard. Alias for '‑‑qav‑upload'
‑‑disable‑metrics, ‑m   Disable the upload of metrics.
‑‑files, ‑F  

Specify a path to a file containing a list of files from the project for which to upload results for. If not supplied, the results will be uploaded for all files in the project. Not available to Validate.

‑‑generate‑qav‑config, ‑g   Generate a Dashboard Client configuration file for a specified Helix QAC project. This file can be used for advanced Dashboard configuration and is generated automatically in most circumstances. This option is primarily for use by Helix QAC consultants and advanced users only.
‑‑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.
‑‑jobs, ‑j 0 Specify the number of jobs to run in parallel for the Dashboard upload. If not supplied or if 0 is supplied, then qaimport will determine the value.
‑‑password‑file, ‑w   A path to a file that contains a Dashboard password. It should be appropriately protected.
‑‑password, ‑p   Dashboard password. Consider using tokens for Dashboard authentication or a password file.
‑‑path‑format, ‑a  

Specify how paths are translated before upload to Dashboard. There are 3 possible values:

  • ROOT (default): PROJECT_ROOT is embedded at the start of the path.
  • ABSOLUTE: Paths are converted to their absolute value.
  • All paths when uploading to Validate are ABSOLUTE
  • RELATIVE: Paths are converted relative to the project directory.
‑‑qaf‑project, ‑P . Specify a path to a valid Helix QAC project.
‑‑qav‑upload, ‑q   Specify to upload results to Dashboard
‑‑repository, ‑r   Specify a source repository that Dashboard can access for version control.
‑s101‑upload, ‑s   Specify to upload results to a structure101 project. An 'upload-location' must be provided for this option.
‑‑snapshot‑name, ‑S  

Specify the snapshot (build) name to be used for this upload. If no name is specified then a default will be used:

  • Dashboard: Name based upon the current date/time in the format: YYYYMMDDHHMMSS.
  • Validate: Name based upon an incrementing upload count.
‑‑snapshot‑parent  

Specify the name of the Dashboard parent snapshot, to which the new snapshot will be directly connected. If this entry is not provided or this parent snapshot is not found, then the last uploaded snapshot is chosen as parent.

‑‑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.
‑‑token, ‑t   For Dashboard, use the supplied authentication token rather than user credentials. See ‑‑dashboard, ‑D for creation details.
‑‑upload‑location, ‑u   A path to the directory where the Structure101 project will be created.
‑‑upload‑project   Specify the project name to be used by Dashboard for this upload.
‑‑upload‑source   Specify the source upload strategy. This can be none, all or code not in the associated project repository.
‑‑url, ‑U  

URL of the results server. By default the http protocol is assumed. Examples include; localhost:80, 127.0.0.1:8080, https://prometheus:8888

‑‑username   Dashboard username. Consider using tokens for Dashboard authentication.
‑‑validate, ‑V   Specify to upload results to Validate.
‑‑validate‑project, ‑b   Upload diagnostics to the specified Validate project/stream (which must already exist).
‑‑vcf, ‑v   Specify a version control file to be uploaded to Dashboard.

Notes

The project to upload must have already been analyzed and not modified, otherwise you will see ‘out of date’ errors and the upload will fail.
When uploading to Structure101 an additional structure101 licenced is needed and the specified ‑‑upload‑location must exist.
When uploading to Validate all files with diagnostics are uploaded and their path format is ABSOLUTE. You must have previously logged into the Validate server – see ‑‑validate, ‑V.

Examples

Upload Diagnostics to Perforce Validate (Connected Projects)

To upload Helix QAC diagnostics for the project in the current directory, with the optional snapshot (build) name ‘snap-1’ issue a command such as:

qacli upload --validate -P . --snapshot-name snap-1

You must have previously linked a Helix QAC project to a Validate project. This only needs to be done once using a command such as:

qacli validate connect -P . --url http://localhost:8080 -–set matrix

Upload Diagnostics to Perforce Validate (Non-connected Projects)

To upload Helix QAC diagnostics for a (non connected project) in the current directory, with the optional snapshot (build) name ‘snap-1’ issue a command such as:

qacli upload --validate -P . --snapshot-name snap-1 --URL http://neo.me/ --validate-project matrix

Upload Diagnostics to Helix QAC Dashboard

To upload Helix QAC diagnostics to the project ‘matrix’ (that already exists on the Dashboard server), with the optional snapshot name ‘snap-1’ issue a command such as:

qacli upload --dashboard --username PRabbit --password-file pwd-file -P . --url http://localhost:8080 -–upload-project matrix --snapshot-name snap-1 –upload-source ALL
This parameter is generally not needed and should only be used when directed by support. Increasing the job count excessively will likely result in slower uploads.

Upload Diagnostics to Perforce Validate Including Tags

To upload Helix QAC diagnostics to Validate and add tags to the build:

qacli upload -V -P . -S snap-1 -U http://neo.me/ -b matrix --tags "main,Fix 1,abcd23df45g"

Upload to structure101

The following command can be used to upload the analysis results of a Helix QAC project to a structure101 project:

qacli upload -P <directory> --s101-upload --upload-location <directory>

Selected Upload of Files (Dashboard & structure101 Only)

It is possible to upload just a single file using the optional unnamed parameter <source-file> or a list of files using the --files option. These can also be used together to provide a combined list of files to upload.

To upload a single file to structure101:

qacli upload -P <directory> --s101-upload --upload-location <directory> main.c

To upload a list of files to Dashboard:

qacli upload --dashboard --username PRabbit --password-file pwd-file -P . --url http://localhost:8080 -–upload-project matrix --snapshot-name snap-1 –upload-source ALL --files file-list

A file-list is a text file made up of one path per line.


  • Upload to Helix QAC Dashboard
  • Upload to Structure101
  • Upload of Selected Files
  • Generate Dashboard Configuration