更新时间:2023-12-05 13:43:28
根据您的意见,您***使用 Text-finder 插件.
Based on your comments, you would be better off with Text-finder plugin.
它允许在文件和控制台中搜索正则表达式,然后将构建设置为 unstable
或 failed
(如果找到).
It allows to search file(s), as well as console, for a regular expression and then set the build either unstable
or failed
if found.
对于 Groovy,您可以使用以下命令访问 ${WORKSPACE}
环境变量:def workspace = manager.build.getEnvVars()["WORKSPACE"]
As for the Groovy, you can use the following to access ${WORKSPACE}
environment variable:def workspace = manager.build.getEnvVars()["WORKSPACE"]