简体   繁体   English

阅读Jenkins登录Shell

[英]Read Jenkins log in shell

I have a requirement that I need to parse the Jenkins job after the completion to grep out the error log and send it in email to the team. 我有一个要求,我需要在完成后解析Jenkins作业,以grep输出错误日志并将其通过电子邮件发送给团队。 Could someone of you suggest what plugin/option is available in Jenkins? 你们中有人可以建议Jenkins提供哪些插件/选项吗?

If you want to parse out the console output after the build steps, try using Groovy Postbuild Plugin . 如果要在构建步骤之后解析控制台输出,请尝试使用Groovy Postbuild Plugin

You can use the manager.logContains function or the manager.build.logFile variable to get the console output. 您可以使用manager.logContains函数或manager.build.logFile变量来获取控制台输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM