Slack notification for single job
Hey guys,
I'm trying to configure build failure notification only for one job in a build with multiple jobs and I cannot find how to do that. It seems like the matrix configuration does not work for notifications, or I misused it. Could you please assist or guide me to proper documentation?
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 10 Oct, 2023 05:31 PM
Hi Yuriy,
It's notifications could be configured on "build" level, not "build job" level, i.e. it's not possible to trigger notifications for specific jobs, only entire build.
However, I see a few solutions/workarounds here. First, if you don't "care" about the results of other jobs, you can declare them under
matrix.allow_failures
, so only the job you are interested in will determine the result of the entire build and trigger "right" notification.Another option would be programmatically send notification in
on_failure
section of that job. If it's Slack it could be done in curl or PowerShell one-liner I believe.Hope that helps.
2 Posted by Yuriy Pelekh on 11 Oct, 2023 07:34 AM
Thanks for the reply Feodor. Yes, it is helpful. I will look for an on_failure option.