- Revenera Community
- :
- Code Insight
- :
- Code Insight Forum
- :
- Re: Is there a way to generate project reports either from the REST API or by using scriptRunner?
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Is there a way to generate project reports either from the REST API or by using scriptRunner?
I've been trying to generate a project report on the command line using scriptRunner, but I can't seem to supply the variables that are supplied via the GUI.
I'd like to be able to run some reports weekly and I couldn't find this in the documentation.
Thanks,
Justin Bellomi
Hello @justinb
For generating any report we have separate utility called “ReportScript-coreServer-1.1.5.zip” (basically report is executed using scriptRunner).
Steps to apply ReportScript-coreServer-1.1.5 utility.
- Download the “ReportScript-coreServer-1.1.5.zip” addon (coreReportScript.zip attached)
- unzip the “ReportScript-coreServer-1.1.5.zip”.
- Place 'pal_core_report.groovy' and 'lib\' directory from 'coreReportScript.zip\ReportScript-coreServer-1.1.5.zip\config\core\scripts\' in '<palamida>\config\core\scripts\'
- Add coreReport.groovy' from 'coreReportScript.zip\ReportScript-coreServer-1.1.5.zip\scriptRunner\scripts\' to '<palamida>\scriptRunner\scripts\'
- Add 'groovy_classes\' directory from 'coreReportScript.zip\ReportScript-coreServer-1.1.5.zip\scriptRunner\lib\' to '<palamida>\scriptRunner\lib\'
- Download ant-launcher-1.8.3.jar
- place 'ant-launcher-1.8.3.jar' in '<palamida>\scriptRunner\lib\' and '<palamida>\tomcat\lib\' directories
- Edit '<palamida>\scriptRunner\conf\scriptRunner.properties' file replacing 'load ! {groovy.home}/lib/ant-launcher-1.7.0.jar' with 'load !{groovy.home} /lib/ant-launcher-1.8.3.jar'
- Navigate to '<palamida>\scriptRunner\bin\'
- ./scriptRunner.sh -u <USER NAME> -c http://<hostname>:<port>/palamida/ ../scripts/coreReport.groovy -r project_report -p 3 -o project_report.zip
Below reports can be generated:
- palamida_report
- project_report
- audit_report_with_excel
- component_usage_report
- license_report
- inventory_report
- inventory_diff_report
- scanned_files_review_progress_report
- policy_report
- license_obligations_report
- third_party_notices_report_inventory
- third_party_notices_report_requests_catalog
- third_party_notices_report_requests_project
- request_report_catalog
- request_report_project
- vulnerability_report
- cve_report_with_requests
- project_stage_status_report
Let me know if you have any questions.
I'm missing a file:
java.lang.Exception: Unable to read pal_core_report.groovy under /palamida/palamida_6.13.2/config/core/scripts
I checked in the CodeInsight_6.13.2.zip and it's not in there either.
I'm sorry I found it... please disregard my last post.
Hi I keep getting the following error no matter what I supply for the -u option:
Error running report: java.lang.IllegalArgumentException: User cannot be null.
Here's my command:
./scriptRunner.sh -u justinb -c "${PALAMIDA_URL}/" -n ../scripts/coreReport.groovy -r audit_report -p 23 -o project_report.zip
I've attached the stacktrace.
How do I supply the "User" value?