1

I have an enterprise SonarQube 7.9 server and I am running my SonarScanner using my Jenkins server. I am trying to generate a SonarQube HTML/PDF report from each project to be emailed out by Jenkins.

Has anyone does this before? Is it possible ?

agabrys
  • 8,728
  • 3
  • 35
  • 73
Rahul Goud
  • 147
  • 2
  • 12

1 Answers1

0

SonarQube Enterpise and above versions provide a way to generate PDF reports and send them to people. Copied from SonarQube 7.9 documentation:

  • Portfolios: Portfolio PRD Report:

    On a Portfolio Home Page, you can download a PDF overview of the Portfolio by selecting Download as PDF from the "Portfolio PDF Report" dropdown menu in the upper-right corner. This is really convenient, for example, if you're going into a meeting where you may not have access to your SonarQube instance.

    You can subscribe to receive a PDF by email by selecting Subscribe from the "Portfolio PDF Report" dropdown. You can set the frequency of the report at the portfolio and global levels to daily, weekly, or monthly. The default frequency is monthly.

    Note: You will only receive the PDF if the Portfolio is computed.

    Portfolios are created and edited in the global Portfolio administration interface: Administration > Configuration > Portfolios. For more information, see Configuring Portfolios and Applications.

  • Portfolio PDF Configuration:

    A user with administrative rights on a portfolio can configure email distribution of the PDF. From a Portfolio Home Page go to Administration > Executive Report.

    Frequency

    You can tune the email frequency of the PDF Report. The possible values are:

    • Daily: report is sent during the first portfolio calculation of the day (if any)
    • Weekly: report is sent during the first portfolio calculation of the week (if any) from Monday
    • Monthly (default): report is sent during the first portfolio calculation of the month (if any), starting from the first day of the current month

    Other Recipients

    If people without SonarQube accounts want to receive the PDF, you can feed the administrative "Other Recipients" field with their email addresses.


If sending them from Jenkins is a must, you have to implement it by your own:

I don't know your requirements, but for me it sounds like wasting a lot of time to implement a feature on Jenkins which is available on SonarQube.

agabrys
  • 8,728
  • 3
  • 35
  • 73