简体   繁体   English

后期构建任务不起作用[Jenkins]

[英]Post build task not working [Jenkins]

Can someone please help. 有人可以帮忙吗? I am trying to trigger a post-build action using the post-build action plugin. 我正在尝试使用构建后操作插件触发构建后操作 The log text that I inputted is returning false, hence not performing a post-build action. 我输入的日志文本返回false,因此不执行构建后操作。 When I don't enter any text, it returns true. 当我不输入任何文本时,它将返回true。

This is a simple freestyle project that should print test if it matches the text Post build setting 这是一个简单的自由式项目,如果它与文本发布构建设置匹配,则应该打印测试

This is the console output returning false Console output returning false 这是控制台输出返回false 控制台输出返回false

This is the output with no text Output with no text 这是没有文本的输出没有文本的输出

Any help will be appreciated. 任何帮助将不胜感激。 All I want to do is perform a post-build action depending on if my build fails or passes. 我要做的就是根据我的构建是失败还是通过来执行构建后操作。 Alternate solution is welcomed 欢迎替代解决方案

Thanks 谢谢

The root cause is your job has no any log out in Job Build Stage, please see Post build task plugin's help, this plugin will search job build log to find the text you specified in plugin. 根本原因是您的作业在Job Build Stage中没有任何注销,请参阅Post build task插件的帮助,此插件将搜索job build日志以查找您在插件中指定的文本。

在此处输入图片说明

A quick way to re-try is add a Build Step to print out something: 重试的快速方法是添加“构建步骤”以打印出一些内容:
1. Execture shell (if job executed on Linux machine) 1. Execture shell (如果作业在Linux机器上执行)
2. Execute windows batch (if job execute on Window machine) 2. Execute windows batch (如果作业在Windows计算机上执行)

A Job configure example: 作业配置示例: 在此处输入图片说明

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

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