1 of 28

Slide Notes

DownloadGo Live

Arduino + Furby Broken Build Notification

Published on Nov 18, 2015

No Description

PRESENTATION OUTLINE

Arduino + Furby Broken Build Notification

OH, YOU'LL WANT TO FIX IT QUICK!
Photo by whatleydude

Annoyance!

LEADS TO INSPIRATION
Photo by Rennett Stowe

Santa and my in-laws
were in cahoots...

Untitled Slide

Sound
Light
Motion + Tilt
Timers
State

We don't break builds (no!)

But we suffer the build breaks of others

Build breaks aren't related to frequency of builds
The majority of build errors are dependency-related
C++ - more errors to fix than Java, but easier

http://m.itworld.com/big-data/424262/why-software-builds-fail

OH, DEVELOPERS...

Photo by osde8info

Project Vision

  • Build break wakes up Furby - 10 second nudge
  • Breaks on top - n * 10 seconds
  • Wake up every 20 minutes to nudge if it's still broken
  • Build fixed - hoorah message!

SO, THAT FURBY SCHEMATIC OR API

USING SOUND TO DRIVE FURBY

https://github.com/iafan/Hacksby

Perl

Path of least resistance integration

Photo by Keoni Cabral

An app to launch the careers...

INTERN TESTERS

OR WOMEN-IN-COMPUTING DAY AT NEXT CENTURY CORPORATION

Breadboard in the kitchen - sounds by
https://github.com/TMRh20/TMRpcm

Arduino Rev 3
SEEEDStudio SD Shield v 3.1
SEEEDStudio Ethernet Shield v1.1
Note shields are not together - interoperability issues
8 ohm mini-speaker from RadioShack (1 live, 2 dead)

Sound library: https://github.com/TMRh20/TMRpcm

RESCUED

MOVIN' RIGHT ALONG

Photo by musicwala

Known payload

../lastBuild/api/json/tree?result,id

Untitled Slide

void loop() {
checkFurbyState();
runResult = queryJenkins();
if (runResult != unknown) {
handleResult(runResult);
}
}

Photo by jenny downing

void checkFurbyState() {
// check if running and should be off

// check if build broken still and need to turn Furby on

}

Photo by Leo Reynolds

void handleResult (enum result) {
switch (result) {
case success: furbyCheer();
case failure: furbyYell(+badResult);
case unstable: furbyYell(+badResult);
//unknown, aborted - no-ops
}
previousRun = result
}

Photo by wanzw

ARDUINO NICETIES

  • Timers via milli() checks
  • Downsizing a library to fit
  • DHCP tradeoffs
  • #define DEBUG

Timers
.. in runFurby
retryVal = millis() + (1000 * 60 *20)

.. in checkFurbyState
if (millis() > retryVal) {
runFurby(badResultCount, false);
}

#define RUNSOUND
#ifdef RUNSOUND
TMRpcm tmrpm;
#endif

Photo by mis1u1

#define DEBUG
#ifdef DEBUG
#define DEBUGX(x) Serial.println(x)
#else
#define DEBUG(x)
#endif

DEBUGX('My debug message');

Photo by piesden

Improvements

  • Jenkins notifications - stubbed, needs testing
  • Arduino with more flash memory - support DHCP
  • Run webserver from Arduino to set job information
Photo by mandiberg

'SHARE THE FURBY PAIN' models

  • Rotate per sprint
  • 'Trophy' for builds broken
  • Grumpy buildmaster approach
Photo by dullhunk



dah-kah-oo-nye
Fix that build!


tina.coleman@nextcentury.com
@colemanserious