在 jenkins 构建结果页面中显示工件
我已经构建了生成一个作为工件存档的 png 图像的版本。我希望将其显示在构建结果页面上。
我知道默认情况下会有一个到图像的链接,但我希望 png 实际上是可见的 - 使用 img 标签
我确信有一个插件,但我找不到它!
感谢您的任何建议!
I have build that generates a png image archived as an artifact. I would like this to be displayed on the build results page.
I know that by default a link to the image will be there, but I would like the png to be actually visible - using an img tag
I'm sure that there is a plugin for that, but i couldn't find it!
Thanks for any suggestions!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将图像显示添加到 Jenkins 项目的最简单方法是编辑项目描述。
在项目顶部的右侧,有一个“编辑描述”按钮。这允许您输入将显示在项目顶部的 HTML 代码。假设您生成的图像具有固定的已知 URL,您应该能够将其添加到此处。
例如,我已经在使用 PDepend 生成代码统计图的 PHP 项目中看到过这种情况。在这些情况下,项目“描述”可能如下所示:
这将导致两个图表显示在项目页面的顶部。
(当然,您也可以输入常规描述文本)。
希望有帮助。
The easiest way to add an image display to your Jenkins project is to edit the project description.
At the top of the project, on the right, there's an 'edit description' button. This allows you to enter HTML code that will be displayed at the top of the project. Assuming the image you generate has a fixed known URL, you should be able to add it in here.
I've seen this done, for example, with PHP projects that use PDepend to generate code stats graphs. In these cases, the project 'description' might look something like this:
This would result in the two charts being displayed at the top of the project page.
(You can, of course, enter a regular description text as well).
Hope that helps.
即使使用了 SDC 提供的解决方案,它对我不起作用。
经过一些研发后,我发现这是 Jenkins
https:// issues.jenkins-ci.org/browse/JENKINS-22028
并在 1.564 或更高版本中解决。
要解决这个问题,您所要做的就是管理 Jenins>配置全局安全>并选择标记格式化程序为 RAW HTML。
Even after using the solution given by SDC, it doesn't worked for me.
After doing some R&D, I observed that it was a bug in Jenkins
https://issues.jenkins-ci.org/browse/JENKINS-22028
and resolved in 1.564 or newer.
To resolve this all you have to do is Manage Jenins> Configure Global Security > and select the markup formatter as RAW HTML.
您可以使用 Sidebar-Link Plugin 来显示小图像(图标) 。否则,获取 Chuck Norris 插件 并根据您的需求对其进行自定义。
You can use Sidebar-Link Plugin for small images (icons). Otherwise get Chuck Norris Plugin and customize it to your needs.