Using Polaris in a Freestyle Job

Use Polaris Software Integrity Platform for Jenkins in a freestyle job.

To use Polaris Software Integrity Platform 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:

  1. Polaris CLI Installation: Select the name that you assigned to your Polaris CLI installation on the Global Tool Configuration screen.
  2. Polaris CLI Arguments:The arguments that you want to be passed to the 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.
  3. Wait for Issues: If you want the build to wait until 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.

    freestyle image
  4. 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.

    freestyle image
  5. Click Save