Search code examples
sonarqube

Passing custom report template to sonar-cnes-report(https://github.com/cnescatlab/sonar-cnes-report/)


I'm attempting to use a custom template for a SonarQube report in an Azure DevOps pipeline with https://github.com/cnescatlab/sonar-cnes-report/ repo. However, instead of generating a SonarQube report with my template applied, the pipeline is producing a document that's just a copy of the template file. I'm using SonarQube 9 with sonar-cnes-report 4.2.

here is the usage,

java -jar $(Build.SourcesDirectory)\sonar-cnes-report\target\sonar-cnes-report-$(CnesVersion).jar -s $(sonarServerURL) -t $(sonarToken) -p $(sonarProjectKey) -r $(configRoot)/templates.docx -o $(Build.ArtifactStagingDirectory)\Sonar-reports

I'm actually passing a .docx file as the template, i've also tried .dotx file but the result was same.I would appreciate your support if you could share some knowledge on this.


Solution

  • Fixed. I was passing a custom template that is not related to the CNES report. In fact, there's a default report template available in the repo. We need to modify it according to our needs, and it will work.