Jenkins post-build步骤忽略"仅在构建成功时运行"选项

时间:2017-08-07 19:51:07

标签: maven jenkins

简单地说,我有一些Jenkins Maven项目,每个项目的Post Step设置为"仅在构建成功时运行。"今天早些时候,主要的Build Step显然失败了,但Jenkins继续运行配置为"仅在构建成功时运行的Post Step。"它做了一些事情,比如无法运行测试,但随后提交并推送代码。

正如我在此编辑之前所承诺的,这是一个带有空工作空间且没有SCM步骤的最小示例:

Failing Maven step, Post Step that should not run

Started by user Jason Young
Building remotely on *** in workspace /var/jenkins/workspace/PoC-buildFailurePostSteps-Maven
Parsing POMs
[PoC-buildFailurePostSteps-Maven] $ /bin/sh -xe /tmp/jenkins5633688611993290464.sh
+ echo 'This is the Post Step. Should not run.'
This is the Post Step. Should not run.
ERROR: No such file /var/jenkins/workspace/PoC-buildFailurePostSteps-Maven/pom.xml
Perhaps you need to specify the correct POM file path in the project configuration?
Finished: FAILURE

Maven步骤失败正是我们所期望的,但构建不应该在该过程中运行Post Step。我怎么可能做错了?

这个缺陷是在Jenkins和fixed in 1.509.1中引入的,但似乎又回到了2.60.2(我正在使用的)。

我正在使用Maven Integration插件v.2.17。

0 个答案:

没有答案