0

Currently I am using this step (in my Pipeline) to publish the CodeNarc Report:

publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'application/Project/build/reports/codenarc', reportFiles: 'main.html', reportName: 'Codenarc', reportTitles: ''])

I can see the Report in my Jenkins Job, but its not pretty formatted (plain text - see image below) like the original CodeNarc-Report in this directory.

Is there any other way to publish the report?

Thanks for any tips.

adbo
  • 767
  • 1
  • 8
  • 23
  • `publishHTML` and `archiveArtifacts` are what I have used previously. – mkobit Dec 19 '17 at 15:23
  • Do you know why the Report of CodeNarc looks so ugly? – adbo Dec 19 '17 at 15:25
  • 1
    If you look at the console in your browser, you will most likely see a bunch of errors relating to CSP restrictions since CodeNarc has inline JavaScript, CSS, images, and other things. You can see more information about the CSP settings at https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy – mkobit Dec 19 '17 at 15:26
  • Any Idea how to fix this? – adbo Dec 19 '17 at 16:22
  • 1
    That documentation shows how you can tune it with the `hudson.model.DirectoryBrowserSupport.CSP` but you will have to have whatever Jenkins administration you have set that up so the service always uses it. – mkobit Dec 19 '17 at 16:58
  • I tried these suggestions, but nothing worked for me. I am using the publishHTML step. – adbo Dec 20 '17 at 09:29
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/161631/discussion-between-adbo-and-mkobit). – adbo Dec 20 '17 at 15:03

0 Answers0