Skip to content

Build status visualization for Jenkins using a Raspberry Pi and an LED strip.

License

Notifications You must be signed in to change notification settings

Zappes/Henkinson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Henkinson - Status Display for Jenkins

The Back Story

I am an IT guy, and my current assignment (as of August 2018) is one as a software development governance guy. You know, the one who processes pull requests, configures Sonar rules, makes sure the guidelines are respected etc. You know, this guy here:

Governance Guy

Now, I obviously keep a close eye on our Jenkins server. Whenever a build turns red, so do I. I just don't think the UI is nice enough to warrant staring at it all the time, so I wanted something better. Something nicer. Something so fucking nerdy that the boss starts crying when he sees it. I wanted the Henkinson.

What is the Henkinson?

The Henkinson is a Raspberry Pi Zero W. It has an LED strip with those nifty WS2812 thingies connected to GPIO18. It has a power supply. It has a VPN connection to our build environment. And it has the code from this repo running on it. The effect of all of these nice things is that the LED strip acts as a VU meter which displays the ratio of red, yellow and green master branches on the Jenkins server at any given point in time. I personally think that this is cool as hell.

Every process begins with the first step. The first step in this case was a cardboard box connected to a puny 1m LED strip.

Multimeter

Strip

Real Data

Step 2: The creation of a nice casing for the strip combined with the addition of a second row of LEDs. Light is better when it's blinding.

Actual Light Box Case

More images are to be expected as soon as I feel like uploading some. You could also take a peek at this google photos album.

How to Use This?

You copy the JAR generated by the maven build, which will be called henkinson-full.jar to some directory on your Pi. You take the systemd service from the etc-folder of this repo and copy it to the right location. You edit it so it contains the proper paths. You take the henkinson.conf file from the etc-folder and copy it to the etc-folder of your Pi. You edit it so it contains the proper data. You ask yourself how to activate the service and which is the "right" directory to put it. You google "create systemd service". You have learned a valuable lesson about Linux. You start the service. You enjoy the pretty lights.

Erm, What About The Hardware?

This shit is really, really trivial. I mean: Connect Pin18 of the Pi to the data line of the LED strip, connect the strip's and the Pi's ground to the power supply, do the same with +5V, you are done.

Look at these links for some inspiration and trivial schematics:

If you don't know what to buy, here are some links to Amazon (Germany) that will even earn me a little referral fee:

OK, I lied. The stuff above is what you need for the most basic version. The actual Henkinson adds the following stuff:

  • A little circuit consisting of an N-channel MOSFET for reverse polarity protection.
  • An LED and a P-channel mosfet. The idea is as follows: As soon as you turn the device on, the LED will turn on. As soon as the software has started up, a thread is started which makes the LED blink. Go figure out what that means exactly by yourself, the only hint is "using a MOSFET as a simple inverter".
  • A piezo buzzer and another N-channel MOSFET that allow the Henkinson to beep. On startup it will output the word "henkinson" in morse code, and when it retrieves a Jenkins result that's worse that the one retrieved before, the word "fuck" will be morsed in the most jolly of ways.

How to Report Bugs and Stuff?

Take a close look at this Github page. You'll see a thing called "issues". That's an issue tracker. Use it. I might even look at what you post there, but don't hold your breath. I've got a day job, you know, and somebody who actually has any use for this project is expected by me to be able to cope with most problems himself.

Can I Participate?

Sure. Fork it, change it, send me a pull request.

Why Does the Code Look Like Shit and Why Don't You Write Tests?

Because my day job deals with quality assurance. I'm fed up with that stuff when I come home, and in my spare time I write shitty code because I can. Feel free to add whatever you think belongs there, but don't expect me to do it.

Why Are There No Schematics Or Circuit Diagrams?

Because fuck you. I hacked that stuff together when I was in the mood to melt some solder, and I didn't feel like drawing diagrams before. Reverse engineer it.

Thanks

I wouldn't have started this project if it hadn't been for the great Diozero library (https://github.com/mattjlewis/diozero) that provides a Java API for the Raspberry Pi. I can't stand Python, I prefer papercuts to C and to be honest, I only like Java. Thanks, Matt, for giving this lib to me. But please stop using System.out for logging purposes, that stuff makes my skin crawl.

About

Build status visualization for Jenkins using a Raspberry Pi and an LED strip.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published