View SonarQube Reports Offline

Hi

I am planning to incorporate the SonarQube in GCP Cloud Platform but I don’t want the SonarQube running 24/7, just initiate when building the pipeline and have the HTML reports copied over to Storage/bucket where everyone can view it offline. After the build, shutdown the SonarQube server.

Is it possible to view the SonarQube reports offline? if yes, how? or where are the HTML pages located (directory)?

Thanks

Hello,

Our scanners are certainly compatible with the idea of running a pipeline with all the tools exiting at the conclusion of the pipeline run. However, as you can see in our architecture overview, the scanners communicate with the SonarQube server during the analysis and upload a report for asynchronous processing.

This means your first problem is that, in a basic pipeline, you won’t know when analysis is truly finished on the SonarQube server side to be able to shut it down. You could overcome that problem by using our web API (documentation embedded within SonarQube) to poll or a webhook to get notification when analysis results are available.

Your next problem is that there is no static HTML analysis report that you can easily capture. If you truly wanted this, you’d have to use our web API to gather the information you desire, build your own report with the results on the fly, and then finally shut the server down at the end of the process.

SonarQube is designed to be interactive and allow developers to explore and more deeply understand in context the details of issues raised, not merely output a flat report with some metrics. All the screens are interactive. So, in my opinion, you’re working against the real goal here if you aim to just gather a skim of basic information and shut the server down.

Hope this helps reframe your approach,
Jeff