cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
bharavioak
Level 2

Jenkins Code Insight Pipeline script - how to generate report

Code Insight 2021 R1 Plugins Guide mentions about the Jenkins Code Insight plugin. Via the Jenkins plugin, we get a dialog wherein we can specify code insight server details and also an option (in the form of a checkbox) to generate report after scan. However, we want to use Jenkins pipeline script to run scan and generate report. The pipeline code example, both declarative and scripted pipeline code, mentions about StartScan step wherein we can specify BaseURL, projectName, alias, host and token. However, there is no step given for generating report after scan via pipeline. How to generate report on Jenkins side after scan?

Labels (1)
(2) Replies
lutterjohann
Level 2

We just use the REST API via shell:

curl -H "Authorization: Bearer ${TOKEN}" -o fnci.zip "$SERVER/api/project/generateReport?projectId=${PROJECTID}&reportType=AUDIT"

 

Luckily (even if the resource naming might suggest just starting the asynchronous report generation process) it regenerates and downloads the report in one stop.

0 Kudos
jwilliams2022
Revenera Community Admin Revenera Community Admin
Revenera Community Admin

Hi @bharavioak,

Thank you for your message and apologies for the delay in our response. Page 44 of the plugin documentation for the Code Insight 2022 R3 version contains full details on configuring reports as part of the build step for a Jenkins plugin scan. This documentation is available at the following link:

https://docs.revenera.com/fnci2022r3/pdf/FNCIPluginGuide.pdf 

If you encounter any further issues with the report generation, please raise a support case and our Support tam will be happy to assist.

Kind Regards,

Jon

0 Kudos