Closed msprotz closed 7 years ago
Is there anything specific that you would want or not want in the slack notification when an error / exit occurs?
I think just sending something like "The ci script exited abnormally; error codes: ${PIPESTATUS[@]}
" would be totally sufficient. This an exceptional condition, which means that one of us would have to look at the VSTS logs anyhow.
How about who slack message goes to? Do the same logic as logging that checks channel if c or a direct message is slackid?
The problem with that logic is that we might not have that info when the script crashes.
No logic in a trap handler -- just a simple one-liner should suffice. We just need a infaillible notification to go out. The notification should go somewhere, I suggest #everest-build
Oh good ... this got easier. :)
Fixed by @darrenge in fab785a
Description: when the script exits prematurely, one last attempt to notify slack should be made.
trap
builtin https://www.gnu.org/software/bash/manual/bash.htmlset -e
)