You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Is there a way to trigger a global halt of the workflow when a particular (shell) action fails instead of continuing with other rules? I have some actions that apply to the whole source location and if they fail it doesn't make sense to go on. It doesn't do much harm though.
Describe the solution you'd like
Something like a fail_globally attribute on the shell action:
actions: # TODO fail completely when this fails
- shell:
cmd: pwsh -C "Write-Error this should stop everything"
ignore_errors: false
# HERE: Causes the whole workflow to stop on failure if an error happens and ignore_errors==false
fail_globally: true
** Alternatives **
It might make sense to have a global-level flag for this behavior, because in my case I'd want to always have it fail globally.
** EDIT: **
I think a similar case could be made for the python filter and python action features.
The text was updated successfully, but these errors were encountered:
Apologies again. I was confused. I realized the ignore_errors field is doing what I want, but when calling pwsh you have to explicitly pass out the exit code for it to make it up the chain.
Reopening. Sorry to flip-flop on this one. After some more experience with the tool it looks like ignore_errors: false causes the actions for that rule to be skipped, but not for all rule processing to stop and organize to halt, which is what I was looking for. I've edited the description to include the python action and filter, which are similar.
Is your feature request related to a problem? Please describe.
Is there a way to trigger a global halt of the workflow when a particular (shell) action fails instead of continuing with other rules? I have some actions that apply to the whole source location and if they fail it doesn't make sense to go on. It doesn't do much harm though.
Describe the solution you'd like
Something like a
fail_globally
attribute on the shell action:** Alternatives **
It might make sense to have a global-level flag for this behavior, because in my case I'd want to always have it fail globally.
** EDIT: **
I think a similar case could be made for the python filter and python action features.
The text was updated successfully, but these errors were encountered: