Using Coverity on Polaris in a Freestyle Job
Use Coverity on Polaris for Jenkins in a freestyle job.
Note: This platform is renamed Coverity on Polaris.References to Polaris or Polaris Software Integrity Platform in this documentation and screenshots are referring to Coverity on Polaris.
To use Coverity on Polaris for Jenkins in a freestyle job, add it as a build step at the point where you want to build your project, and complete the following:
- Polaris CLI Installation: Select the name that you assigned to your Coverity on Polaris CLI installation on the Global Tool Configuration screen.
-
Polaris CLI Arguments:The arguments that you want to be
passed to the Coverity on Polaris CLI, for example, analyze. Arguments
that are passed in here must adhere to the following guidelines:
- All arguments must be separated by whitespace (specifically: spaces, tabs, newlines, carriage returns, or linefeeds).
- All values containing whitespace must be surrounded by quotation marks.
- You must escape all quotation marks (", ') that are used in values.
- You must escape all backslashes (\) that are used in values.
-
Wait for Issues: If you want the build to wait until
Coverity on Polaris determines whether there are issues with your project, check
this box and use the If there are issues field menu to select the action
you want the plug-in to take when issues are discovered. Click
Advanced... if you want to adjust the maximum length
of time the job will wait for issues (Job timeout in minutes). If you want the
build to proceed without waiting, leave the Wait for Issues checkbox
unchecked.
The following image shows a simple freestyle build example.
-
Populate SCM changeset in file at $CHANGE_SET_FILE_PATH for
incremental analysis: Use this option for incremental analysis
(LCA). Select this checkbox to create a file at the
$CHANGE_SET_FILE_PATH
path that contains a list of files generated from the SCM changeset, which Jenkins provides. This file is used in the incremental analysis (LCA) and represents a list of changed files for analysis. The changeset must originate from your SCM.- Changeset inclusion patterns: Add inclusion patterns to include
specific file types, for example,
'*.java'
to include the pattern. - Changeset exclusion patterns: Add exclusion patterns to include
specific file types, for example,
'*.jpg'
to exclude the pattern. - When static analysis is skipped because the change set contained no files to analyze: Use the dropdown menu to select how you want the build to be marked when the changeset is empty.
The following image shows a simple freestyle build example with the changeset option. - Changeset inclusion patterns: Add inclusion patterns to include
specific file types, for example,
- Click Save