如何在GitLab通知邮件中添加失败描述?

发布于 2025-01-15 00:23:43 字数 439 浏览 1 评论 0原文

我在 GitLab 中有一个带有管道的项目,如果管道失败,我启用了通知邮件。

这是我的通知现在的样子:

notification

在 GitLab 网站上,我得到了这个不错的失败总结:

failure

如何修改或扩展修改邮件以也包含失败? 如果无需在网站上检查即可看到失败的实际原因,那就太好了。

I have a project with a pipeline in GitLab and I enabled notification mails if the pipeline fails.

This is how my notification looks right now:

notification

On the GitLab website I get this nice failure summery:

failure

How can I modify or extend the modification mail to also include the failure?
It would be nice to see the actual cause of the failure without a check in on the website.

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

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

发布评论

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

评论(1

乖乖公主 2025-01-22 00:23:43

失败管道通知电子邮件中的作业日志已被 GitLab 团队于 2020 年 9 月有意删除。这是 实施更改的合并请求。这是在 2020 年 9 月 22 日创建的 13.4.0 版本中。 Changelog 说:从通知电子邮件中删除作业日志。 !42395

他们列出的原因是:

  • 通常需要 30 多行代码才能理解构建失败。
  • 这些日志可能会泄露敏感信息。
  • 通知电子邮件大约与以下时间安排相同:
    作业日志归档到对象存储,因此通知服务可以
    需要从共享卷(NFS)读取。当存在竞争条件时
    文件已存档,发生这些情况时我们必须重试

Job logs in the Failed Pipeline notification emails were intentionally removed by the GitLab team in September 2020. Here's the Merge Request that implemented the change. This was in the 13.4.0 release created 2020-09-22. The Changelog says: Remove job logs from notification e-mails. !42395

Their listed reasons were:

  • Often more than 30 lines are needed to understand a build failure.
  • These logs could leak sensitive information.
  • The notification e-mails are scheduled around the same time when the
    job log is archived to object storage, so the notification service may
    need to read from a shared volume (NFS). There are race conditions when
    the file has been archived, and we have to retry when these happen
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文