目录
Jenkins上修改配置 通过Groovy脚本在Script Console中设置和修改系统属性
通过合理调整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了报告的查看