Jenkins上生成的allure report打不开怎么处理

目录

问题背景:

原因:

解决方案:

Jenkins上修改配置 通过Groovy脚本在Script Console中设置和修改系统属性

步骤

验证是否清空成功

进一步的定制

也可以使用Nginx去解决

使用逆向代理服务器Nginx:

通过合理调整CSP配置,可以平衡安全性与功能性的需求。在生产环境中,务必进行必要的安全性考量,以防止潜在的安全漏洞。总结:


问题背景:

Jenkins上没有安装allure相关插件 只是将生成的报告发送到个人邮箱; 但是在workspace生成之后 点击index.html出现下面的情况 一直处于加载中 F12查看 app.js文件无法加载 但是验证了其实是成功生成了的 并且在本地查看的时候是正常显示的 

原因:

  具体原因是console的报错
“Refused to load the script 'https://saldevops.jaas-gcp.cloud.sap.corp/job/support-python-ui-test/118/execution/node/3/ws/PANA/allure-report/plugins/packages/index.js' because it violates the following Content Security Policy directive: "script-src 'unsafe-inline'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback. index.html:1  Refused to load the script 'https://saldevops.jaas-gcp.cloud.sap.corp/job/support-python-ui-test/118/execution/node/3/ws/PANA/allure-report/plugins/screen-diff/index.js' because it violates the following Content Security Policy directive: "script-src 'unsafe-inline'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.”

从报错不难看出是浏览器block了报告的查看

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值