如何从$ BUILD_LOG变量获取最后20行? [英] How can I take last 20 lines from the $BUILD_LOG variable?

查看:631
本文介绍了如何从$ BUILD_LOG变量获取最后20行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用Email-ext插件时,我也想写最后20行的生成日志(不附加为文件)
我知道我可以访问日志使用$ BUILD_LOG变量,但don不知道如何从那个变量中取出20条线。
任何帮助?
非常感谢。

When using Email-ext plugin, I would like also to write the last 20 lines of the build log there (not attached as a file) I know I can access the log using $BUILD_LOG variable, but don't know exactly how to take the las 20 lines from that variable. Any help? Thanks a lot.

推荐答案

您可以从Content Token引用中使用以下语法:

You could use the following syntax, from the Content Token reference:

$ {BUILD_LOG,maxLines,escapeHtml} - 显示构建日志的结尾。
maxLines - 最多显示这多行日志。
默认为250.
escapeHtml - 如果为true,则HTML被转义。
默认为false。

${BUILD_LOG, maxLines, escapeHtml} - Displays the end of the build log. maxLines - display at most this many lines of the log. Defaults to 250. escapeHtml - If true, HTML is escaped. Defaults to false.

这篇关于如何从$ BUILD_LOG变量获取最后20行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆