在 Hudson 中发布失败/损坏的构建的文件/工件?

发布于 2024-08-15 17:21:14 字数 195 浏览 1 评论 0原文

我想为每个构建发布某些文件,无论成功/失败。就我而言,我想发布从我们已实现的 JUnit RunListener 实现生成的报告,但是我也发现发布其他日志文件以及我感兴趣的任何其他特定文件很有用。

我知道 TeamCity 这样做是出于以下原因:盒子。哈德森可能吗? DocLinks 插件和“归档工件”复选框似乎只适用于成功的构建。

提前致谢

I'd like to publish certain files for each build regardless of success/failure. In my case I want to publish a report generated from a JUnit RunListener implementation we've implemented, however I would also find it useful to publish additional log files, and any other specific files I am interested in.

I know TeamCity does this out of the box. Is it possible with Hudson? The DocLinks plugin and the "Archive the artifacts" checkbox only seem to work for successful builds.

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静若繁花 2024-08-22 17:21:14

即使构建失败,“归档工件”功能也会启动。如果没有,我认为这是一个严重的错误。您使用的是哪个版本的 Hudson?

The "archive the artifacts" feature kicks in even for failed builds. If it doesn't, I consider that a serious bug. Which version of Hudson are you using?

︶ ̄淡然 2024-08-22 17:21:14

到目前为止,我认为 Hudson 在运行 junit 测试时将作业标记为不稳定而不是失败。

但是,如果您不想创建自己的插件,则可以使用解决方法。基本思想是向 Hudson 隐瞒最初的失败,并在告诉 Hudson 存在问题之前做任何需要做的事情。

有不同的方法。

  1. 始终向 Hudson 隐藏错误,作业永远不会失败,但是报告将始终发布。缺点是,您需要监视作业/报告,因为 Hudson 不会告诉您存在问题。

  2. 在 Hudson 之外捕获错误,然后在 Hudson 之外发布,然后告诉 Hudson 出现错误,然后让 Hudson 完成剩下的工作。

I thought so far, that Hudson marks a job as unstable instead of failed when running the junit tests.

However, If you don't want to create your own plugin, you might use a workaround. The basic idea is to hide from Hudson the initial failure and do whatever needs to be done before telling Hudson that there is a problem.

There are different approaches.

  1. Always hide errors from Hudson, the job will never fail, however, the report will always be published. The disadvantage is, that you need to monitor the jobs/reports since Hudson will not tell you that there is a problem.

  2. capture the error outside of Hudson, than do your publish outside of Hudson, and than tell Hudson that there was an error and let Hudson do the rest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文