HTMLPublisher CORS blocking fonts

19 views
Skip to first unread message

Kris Luhr

unread,
Feb 20, 2020, 7:25:30 AM2/20/20
to Jenkins Users
Hi, 
I have a Jenkins pipeline that as part of the build uses Storybook to create a snapshot of our components. 
This is done by letting storybook create a static site that uses frames to show the displayed component.
As part of the build I want to publish this site so we can monitor the look of the components in each build, so I am using HtmlPublisher to do this.

Problem is that the font file that we use for our icons is not loading, Chrome reports a CORS error:

Access to font at 'https://jenkins.intra.netclean.com/job/paliscope/job/epic-x/Storybook/static/media/icomoon.168545eb.woff2' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 

So I have been trying to use the CORS plugin to allow this but I can't seem to get it to work, since the origin is 'null'...
Not sure if its the HtmlPlugin frame or the Storybook frame inside it that is the problem, but the downloaded zip is looking good.

It would be nice to use HtmlPublisher without frames, I keep each report in a separate link and window anyway, but that does not seem possible yet (https://issues.jenkins-ci.org/browse/JENKINS-59874)
Anybody know how to fix this?
Any pointers is appreciated!
/Kris

Reply all
Reply to author
Forward
0 new messages