Jenkins and Slack Report Build Failure! Light the Beacons!

When you have a large software development team working on a project, monitoring the build server is an important part of the process. When a message comes in from your build servers, you need to take time away from what you’re doing to make sure the build’s not broken and, if it’s broken because of something you did, you have to stop what you’re doing, start fixing it and let people know that you’re on it.

[ridingintraffic]’s team uses Jenkins to automatically build their project and if there’s a problem, it sends a message to a Slack channel. This means the team needs to be monitoring the Slack channel, which can lead to some delays. [ridingintraffic] wanted immediate knowledge of a build problem, so with some software, IoT hardware, and a rotating hazard warning light, the team now gets a visible message that there’s a build problem.

An Adafruit Huzzah ESP8266 board is used as the controller, connected to some RF controlled power outlets via a 434MHz radio module. To prototype the system, [ridingintraffic] used an Arduino hooked up to one of the RF modules to sniff out the codes for turning the power outlets on and off from their remotes. With the codes in hand, work on the Huzzah board began.

An MQTT broker is used to let the Huzzah know when there’s been a build failure. If there is, the Huzzah turns the light beacon on via the power outlets. A bot running on the Slack channel listens for a message from one of the developers saying that problem is being worked on, and when it gets it, it sends the MQTT broker a message to turn the beacon off.

There’s also some separation between the internal network, the Huzzahs, and the Slack server on the internet, and [ridingintraffic] goes over the methods used to communicate between the layers in a more detailed blog post. Now, the developers in [ridingintraffic]’s office don’t need to be glued to the Slack channel, they will not miss the beacon when it signals to start panicking!

10 thoughts on “Jenkins and Slack Report Build Failure! Light the Beacons!

  1. I agree, simple has less chance of issues. Maybe this Adafruit light would allow for a yellow light for “fixing it”. Maybe a sound (not too annoying) so devs don’t have to keep looking up. If there is delay in a Slack notification (or a web outage), don’t use that as a trigger, I like the bash idea George Tsiros mentions to trigger a value echoed to a serial port which can be the device or the ESP8266 listening on wifi.

  2. Just get Jenkins to email the offender and team lead. Not difficult…

    Sure, do stuff like this for fun, but don’t make out there aren’t sensible/boring ways to do it trivially. It’s what Jenkins is for, after all…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.