如何创建詹金斯管道来存储部署日志(部署证据)

发布于 2025-02-09 16:08:41 字数 36 浏览 1 评论 0原文

我必须记录并存储部署日志以进行部署。您能帮我如何继续操作。

I have to log and store the deployment logs for a deployment. Could you please help me how to proceed with it.

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

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

发布评论

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

评论(1

满身野味 2025-02-16 16:08:41

您可以通过对它们进行存档。这样可以确保每个构建都有自己的独立文件夹,并附有附加的日志。一个限制是,必须在工作区文件夹中生产日志,否则詹金斯将无法存档。

在这种情况下,您可以简单地让管道使用时间戳创建一个新文件夹,然后将日志移动成功(或者在失败方面,具体取决于您的用例)。

最后,您还拥有插件如果正确定义它们,可以为您处理日志记录。

You could store logs by archiving them. This ensures that each build has their own separate folder with the logs attached to them. One limitation is that the logs must be produced inside the workspace folder, or Jenkins will not be able to archive them.

In this kind of situation, you could simply have the pipeline create a new folder with the timestamp and move the logs there on success (or on failure as well depending on your use case).

Finally, you also have plugins that can handle the logging for you if you define them properly.

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