I’m trying to set up a Slack notification so there’s an alert sent on the first instance of a pipeline failing. And then no subsequent alerts sent until the pipeline passes again.
So if there are N failures before the pipeline passes again, I only get two alerts sent: the first time it failed, and then again when it starts to pass.
Under Choose notifications to send... in the Notification Services settings in the the Failed option what I want here? Will that only alert once in this case?
I’m failing to turn up docs that explain the difference between Failed and Failing in this setting screen:
FAILED : The build failed FAILING: The build is failing
So you should get notifications when a Build has failed and when there has been fix on the pipeline. Essentially The Failing state is a process that is continuous which means all the job in that particular build have not yet finished.
What i noticed in the notifications is if you select only Fixed and Failed Builds, it will default to only send notifications for failed builds and rebuilds.
A diagram to show Build State transitions in Buildkite
Yes exactly we do not have this feature natively. I think you might be able to achieve something custom by leveraging the Builds API to find out the build states in between and then create a notification based on that results.
Another option might be to use trigger step to trigger a pipeline that can send that notification based on the conditions.
That is correct. For that you will need to have, for example, an artifact that records the previous states. It’s not ideal, and basically, it will require building your own service.
We don’t have another option at the moment, but our Product team will work during next quarter to prioritize and design a better Slack integration, that will hopefully make this type of request easier.