Big Flashing DevOps Thing with Travis CI and Raspberry Pi 2

A while back I heard about Big Flashing DevOps Thing which shows you how to build a LED sign using a Raspberry Pi + BlinkyTape to display the current status of your build/deployments.  Pretty cool!

Big Flashing DevOps Thing

But at Hyperfish we are using Travis CI for our builds/tests, not Jenkins that the provided code currently supports.

Time to tweak!

The source for the original project is available on Github here: https://github.com/muce/SAWS and includes most of what you already need.  It has two parts to it:

  1. bash scripts that you schedule to download the status of a project and log it to a file
  2. a python script that reads the log files and updates the sign appropriately

To get this working with Travis CI it was a fairly simple job of tweaking a copy of the existing bash script to download the Travis build status.  Travis provides both XML or JSON feeds secured with a simple authentication token on the query string. Example below:

<Projects>
 <Project
 name="Hyperfish/hyperfish.com"
 activity="Sleeping"
 lastBuildStatus="Success"
 lastBuildLabel="48"
 lastBuildTime="2015-09-25T20:47:25.000+0000"
 webUrl="https://magnum.travis-ci.com/Hyperfish/hyperfish.com" />
</Projects>

The bash script simply downloads this feed, parses out the relevant information and then writes the appropriate color settings for the LEDs to a log file.  If the script sees the build is working it writes a number corresponding to Green in the log file.  It does this for however many repos you want to monitor.

The full travis script is here: https://github.com/LoungeFlyZ/SAWS/blob/master/travis.sh

(I have submitted a Pull Request to the original repo to add this support for Travis too)

Here is a short video of my BlinkyTape updating status and setting the lights.  In my case I set it up to monitor 3 repos in Travis, so the tape is divided into three sections to show status for each one.

Build status showing via BlinkyTape and Raspberry Pi 2

A video posted by Chris Johnson (@loungeflyz) on

This all requires a working Raspberry Pi and a basic knowledge of running scripts in Linux.  In my case I am running it with Raspbian (a Linux distro for the Pi).

Leave a Reply

Your email address will not be published. Required fields are marked *