Can we distinguish between failed and canceled jobs?
Is there a way to distinguish, in the on_failure section, between a job that failed because of an error and a job that was canceled (because a later build was started, or because another job on the same build failed and fast_fail is set)?
I'm adding a notification for some kinds of failures, and rather than getting one from every job when a build is replaced or fast fails, I'd rather have the one failed job (if any) notify and the rest do nothing. :)
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 31 Oct, 2019 04:25 AM
Well, I would say
on_failure
won't be called if the job is cancelled, so my understanding you can send a notification inon_failure
that means the job has failed indeed. Let me know if I correctly understood the problem.2 Posted by finnre on 31 Oct, 2019 06:37 PM
Ah, it seems you did and I didn't, yeah. :) I had a few failure notifications pop up at the same time, but I think they just managed to squeak through before canceling each other. Seems to be a coincidence. Thanks!