How do I show the SonarQube Static Code Analysis Report PDF link in the Build Log in the TeamCity (On-Premises) Build Pipeline?

Hi,

I am using SonarQube (On-Premises) & TeamCity (On-Premises).

How do I show the SonarQube Static Code Analysis Report PDF link in the Build Log in the TeamCity (On-Premises) Build Pipeline?

Thanks in advance.

Hi @VivekG ,

Can you show an example of what you want? What does the “SonarQube Static Code Analysis Report PDF link” look like? We provide PDF reports for portfolios and security reports, but not a Sonar scan analysis. There is a link to the report like this in the Sonar scanner logs:

INFO: CPD Executor CPD calculation finished (done) | time=8ms
INFO: Analysis report generated in 63ms, dir size=186 KB
INFO: Analysis report compressed in 33ms, zip size=32 KB
INFO: Analysis report uploaded in 1059ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://sonarjoe.com/dashboard?id=typeof
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarjoe.com/api/ce/task?id=AXo1Q6C632BlgW77Erce
INFO: Analysis total time: 19.985 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 21.928s
INFO: Final Memory: 8M/34M
INFO: ------------------------------------------------------------------------

If that is not what you want, then you will need to use the Web API endpoints and generate the report, then convert it to a PDF and then add it to your pipeline to get a link to it.