jenkinsci / jenkinsci/postbuild-task-plugin

[JENKINS-32460] Post build task ignores previous task failure

Open
#56 1 comment 0 reactions 0 assignees View on GitHub
component:postbuild-task-plugin imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
8
Forks
19
Avg merge
38m
Merged PRs (30d)
1

Description

I have several Post build tasks in one Conditional action (Always). All of these tasks have these checked:


  • Run script only if all previous steps were successful

  • Escalate script execution status to job status

One of these failed, and so the job failed, but the rest of the Post build tasks still ran. That is not what I expect to happen - seems like a bug to me.

Could not match :There was an error while executing a query. : False

Match found for :for complete error details : True

Logical operation result is TRUE

Running script : MySQLSyncFailure

[workspace] $ cmd /c call C:\Users\NETWOR~1\AppData\Local\Temp\hudson5148263034762842144.bat

C:\Jenkins\jobs\Intranet-Deploy\workspace>MySQLSyncFailure

'MySQLSyncFailure' is not recognized as an internal or external command,

operable program or batch file.

C:\Jenkins\jobs\Intranet-Deploy\workspace>exit 9009

*POST BUILD TASK : FAILURE

END OF POST BUILD TASK : 2

ESCALATE FAILED POST BUILD TASK TO JOB STATUS*

Match found for :BUILD SUCCESSFUL : True

Logical operation result is TRUE

Running script : c:\Scripts\RobocopyWrapper.exe c:\intranet-phinx \\intranet.pridedallas.com\c$\intranet-phinx /MIR /NS /NC /NFL /NDL /NP

c:\Scripts\RobocopyWrapper.exe "%WORKSPACE%" \\intranet.pridedallas.com\inetpub\wwwroot /MIR /NS /NC /NFL /NDL /NP

[workspace] $ cmd /c call C:\Users\NETWOR~1\AppData\Local\Temp\hudson8507112162448117925.bat

C:\Jenkins\jobs\Intranet-Deploy\workspace>c:\Scripts\RobocopyWrapper.exe c:\intranet-phinx \\intranet.pridedallas.com\c$\intranet-phinx /MIR /NS /NC /NFL /NDL /NP

C:\Jenkins\jobs\Intranet-Deploy\workspace>c:\Scripts\RobocopyWrapper.exe "C:\Jenkins\jobs\Intranet-Deploy\workspace" \\intranet.pridedallas.com\inetpub\wwwroot /MIR /NS /NC /NFL /NDL /NP

C:\Jenkins\jobs\Intranet-Deploy\workspace>exit 0

POST BUILD TASK : SUCCESS

END OF POST BUILD TASK : 3

---
Originally reported by laurin1, imported from: Post build task ignores previous task failure


  • status: Open
  • priority: Critical
  • component(s): postbuild-task-plugin
  • label(s): plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251223-222157

Raw content of original issue

I have several Post build tasks in one Conditional action (Always). All of these tasks have these checked:


  • Run script only if all previous steps were successful

  • Escalate script execution status to job status

One of these failed, and so the job failed, but the rest of the Post build tasks still ran. That is not what I expect to happen - seems like a bug to me.

Could not match :There was an error while executing a query. : False
Match found for :for complete error details : True
Logical operation result is TRUE
Running script : MySQLSyncFailure
[workspace] $ cmd /c call C:\Users\NETWOR~1\AppData\Local\Temp\hudson5148263034762842144.bat

C:\Jenkins\jobs\Intranet-Deploy\workspace>MySQLSyncFailure
'MySQLSyncFailure' is not recognized as an internal or external command,
operable program or batch file.

C:\Jenkins\jobs\Intranet-Deploy\workspace>exit 9009
*POST BUILD TASK : FAILURE
END OF POST BUILD TASK : 2
ESCALATE FAILED POST BUILD TASK TO JOB STATUS*
Match found for :BUILD SUCCESSFUL : True
Logical operation result is TRUE
Running script : c:\Scripts\RobocopyWrapper.exe c:\intranet-phinx \\intranet.pridedallas.com\c$\intranet-phinx /MIR /NS /NC /NFL /NDL /NP
c:\Scripts\RobocopyWrapper.exe "%WORKSPACE%" \\intranet.pridedallas.com\inetpub\wwwroot /MIR /NS /NC /NFL /NDL /NP
[workspace] $ cmd /c call C:\Users\NETWOR~1\AppData\Local\Temp\hudson8507112162448117925.bat

C:\Jenkins\jobs\Intranet-Deploy\workspace>c:\Scripts\RobocopyWrapper.exe c:\intranet-phinx \\intranet.pridedallas.com\c$\intranet-phinx /MIR /NS /NC /NFL /NDL /NP

C:\Jenkins\jobs\Intranet-Deploy\workspace>c:\Scripts\RobocopyWrapper.exe "C:\Jenkins\jobs\Intranet-Deploy\workspace" \\intranet.pridedallas.com\inetpub\wwwroot /MIR /NS /NC /NFL /NDL /NP

C:\Jenkins\jobs\Intranet-Deploy\workspace>exit 0
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 3


1 attachment

- [PastedImage1452794609.png](https://issues.jenkins.io/secure/attachment/31630/PastedImage1452794609.png)
> ![PastedImage1452794609.png](https://issues.jenkins.io/secure/attachment/31630/PastedImage1452794609.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.