在 Hudson 中发布失败/损坏的构建的文件/工件?
我想为每个构建发布某些文件,无论成功/失败。就我而言,我想发布从我们已实现的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
即使构建失败,“归档工件”功能也会启动。如果没有,我认为这是一个严重的错误。您使用的是哪个版本的 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?
到目前为止,我认为 Hudson 在运行 junit 测试时将作业标记为不稳定而不是失败。
但是,如果您不想创建自己的插件,则可以使用解决方法。基本思想是向 Hudson 隐瞒最初的失败,并在告诉 Hudson 存在问题之前做任何需要做的事情。
有不同的方法。
始终向 Hudson 隐藏错误,作业永远不会失败,但是报告将始终发布。缺点是,您需要监视作业/报告,因为 Hudson 不会告诉您存在问题。
在 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.
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.
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.