Build Lights

A few years back I created some build lights for our Continuous Integration (CI) server. You maybe asking “What are build lights?”. Well in a continuous integration server every time a developer checks in code to a source control repository it triggers an event on the CI server. The CI server will typically download the latest code from the repository build it and run all the unit tests. If all the test pass then it will typically copy the latest code to your development environment. If it fails people want to know ASAP, so they can fix whatever broke the build.

Build lights are the physical signal of whether or not all the unit tests have passed or they have failed.

When I built this project 3+ years ago I used a RPi to query our TeamCity CI Server using their XML REST based API. I wrote a script in python that polls the status every N seconds. If ANY of the unit tests fail a red LED would light up! This was the signal to the developers AND the project manager something was wrong. The best part was seeing how the other developers reacted. We had a number of unit tests that were failing for weeks and no one was fixing them, within 2 hours after I setup my RPi with the build lights the developers on the team had fixed ALL of unit tests that were having issues! 🙂

After that it was like a challenge to see who would fix the issue when the light would go red. In fact, the project manager would even jump in and ask why is the light red? It was amazing to see the effect it had on the team!

The reason I bring this up today and I’m blogging about it is… I’ve finally got around to hooking up the RPi to a stop signal that I bought on Amazon. To hook up a RPi to mains voltage I used a SainSmart 4-channel 5V relay.

Check out the video!