I have several automated builds set up on docker hub. I see that I can set up a webhook to POST to a URL on a successful build, but it seems like it's more useful to be notified of a failed build. Is there any way to do that?
I tried adding a webhook and then pushing a deliberately bad RUN instruction to my Dockerfile. The automated build failed as expected but nothing was sent to my webhook.
Some of my builds are triggered not by git pushes but by cron jobs, so even if I tested the build before every commit, it wouldn't catch this situation. Builds that are successful one day could fail the next due to changing contents of URLs downloaded via ADD.
So...is there a way to get a notification of a failed automated build? If not, consider this a feature request.
You can turn on email-based notifications that a build has failed by going under your user settings option and clicking on notifications and checking the appropriate box. (Thanks @docker twitter account; this wasn't obvious to me either! https://twitter.com/DockerSupport/status/555912171792527360 )
As you have observed, a webhook for a POST event is not available for failed builds. I imagine the idea is that these are more for triggering some follow-up event such as telling a machine to pull the new image, while an email notification makes more sense for a failed build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With