跳至主要内容

博文

目前显示的是 十二月, 2020的博文

解决 Jenkins 中无法展示 HTML 样式的问题

 原文链接 问题描述 对于测试报告来说,除了内容的简洁精炼,样式的美观也很重要。常用的做法是,采用 HTML 格式的文档,并搭配 CSS 和 JS ,实现自定义的样式和动画效果(例如展开、折叠等)。 在 Jenkins 中要展示 HTML 文档,通常采用的方式有两种: 使用 HTML Publisher Plugin ; 使用 Files to archive 功能,在 Build Artifacts 中显示 HTML 文档链接。 第一种方式配合插件,可以通过图形化操作实现简易配置,并且展示效果也不错;而第二种方式的优势在于使用 Jenkins 自带的功能,不依赖插件也能实现基本的需求。 然而,不管是采用哪种方式,都有可能会遇到一种情况,就是展示出来的 HTML 报告样式全无。在浏览器的 Network 中查看资源加载情况,会发现相关的 CSS 和 JS 都没法正常加载。 1 2 3 4 Refused to load the stylesheet 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' because it violates the following Content Security Policy directive: "style-src 'self'". Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-0EZqoz+oBhx7gF4nvY2bSqoGyy4zLjNF+SDQXGp/ZrY='), or a nonce ('nonce-...') is required to enable inline execution. Blocked script execution in 'http://10.13.0.146:8888...

How change default SVN username and password to commit changes?

 原文链接 第一种方法: To use alternate credentials for a single operation, use the  --username  and  --password  switches for  svn . To clear previously-saved credentials, delete  ~/.subversion/auth . You'll be prompted for credentials the next time they're needed. These settings are saved in the user's home directory, so if you're using a shared account on "this laptop", be careful - if you allow the client to save your credentials, someone can impersonate you. The first option I provided is the better way to go in this case. At least until you stop using shared accounts on computers, which you shouldn't be doing. To change credentials you need to do: rm -rf ~/.subversion/auth svn up  ( it'll ask you for new username & password ) 第二种方法: since your local username on your laptop frequently does not match the server's username, you can set this in the ~/.subversion/servers file Add the server to the [groups] section with a name, then add a section with...