Skip to main content

Configuring the Publication of a Code Insight Report in Jenkins

Optionally, the Jenkins scan-agent plugin can be configured to generate a Code Insight report of your choice as part of the Jenkins build scan. After the plugin sends the scan results to Code Insight, the specified report is generated in Code Insight and sent back to Jenkins, where you can then view it as part of the build process. Thus, the report provides a means to view the results of the build scan within Jenkins itself without having go to Code Insight to see the results. (The report is also available in Code Insight on the Reports tab for the project.)

Viewing the Code Insight report as part of the build scan requires that the Jenkins HTML Publisher extension be installed in the Jenkins build environment. See Prerequisites for the Jenkins Scan-Agent Plugin.

To configure the report generation as part of the build scan, you must do the following:

Configuring the Publication of the Code Insight Report in Jenkins

To configure the publication of the Code Insight report once it is sent to Jenkins post-build, go the Post-build Actions section of the build scan job and open the Build HTML reports page.

Define the following required parameters:

  • HTML directory to archive—Enter codeinsight-reports.
  • Report title—Enter any meaningful title for the report (for example, Code Insight Report).

Click Publishing options... to display these required parameters:

  • Include file—Enter the file extension for the report in the format **/*.<file-extension>, as in the example **/*.html. This option is required to keep past HTML reports.
  • Keep past HTML reports—Select this option to view the report as part of each build.