Signalling Your Jenkins Build Status with a Mini USB Traffic Light

by Julian Heise - 8 Jun 2017

As part of an effort to increase developer awareness of quality, we wanted to draw attention the fact that you should have healthy CI builds. The normal procedure revolved around emails sent to the individuals who broke the build with their last commit. With almost all of us used to receiving a lot of email-noise throughout the day, this is not a channel where you can expect an immediate reaction.

We wanted some means to alert a team of their failing build that is prominent and not prone to getting lost in the background. We figured it should be some kind of hardware - maybe an alert light or flashing LED or something… something that is able to draw your attention, but not be too annoying at the same time.

Finding the right solution

First drafts considered blink(1) - a small LED that is plugged into a USB slot and then controlled via an API. It can display a whole bunch of colours and flash at different rhythms. The downside is that it is very small and thus not prominent enough to reliably catch the attention of a whole team.

There were also discussions about single color lamps and alert lights, but we found them too annoying or just plain boring. The Retaliation approach with a USB rocket launcher is hilarious, though a bit too difficult to set up and maintain for the amount of teams in our company.

So, we came up with the Traffic Light that changes its color based on the outcome of one or more Jenkins jobs: green for passing, red for failing (now, who would have thought that?). At the time there wasn’t anything similar available, we just built it ourselves. The result is an open source release that natively supports Jenkins and Travis CI, but it’s also able to draw data from other endpoints by means of Regex Evaluation.

How did we go about it?

If you are interested in setting up the Traffic Light for your team, there is a comprehensive guide in the README. The current package is supposed to run as a daemon on Linux systems. Most of the installation is handled automatically, but one of the dependencies has to be built manually (covered in the setup guide). Once you have it running, you can add your Jenkins (and other) jobs easily by providing a JSON file.

For our internal rollout we used a RaspberryPi 2 to run the daemon on Raspian, because the PI has a low energy consumption and runs independently from our developer’s workstations. The total cost per Traffic Light is about 80€ overall (including RaspberryPi).

null

Summary and results

With the introduction of the Traffic Light for certain developer teams, we intended to pique curiosity and eventually attract attention for solid automated software testing. Additionally we wanted to reward teams who already made an effort towards testing.

Was the project worth it? Absolutely! For a price tag of under 100€ we put together a device that helps raise awareness for failing builds. Almost everybody introduced to the idea asked us how they could get their own Traffic Light.

If you have any further questions regarding the project, feel free to reach out via email to julian.heise@zalando.de.

Similar blog posts