Loren Halvorson's Blog

If your only tool is a hammer...

Using an Ambient Orb to show continuous integration build status

A while ago I wrote that one of our developers was going to get an Ambient Orb and use it to signal the status of our continuous integration builds.  I'm just following up to say that we have it working. The orb is sitting up above the cubes on a shelf where you can see it from anywhere on the floor. It glows green when the build is successful, and slowly pulses red when the build is broken.

What an interesting device. It's plugged into a power outlet, that's all. It receives commands to change color through a wireless network. You trigger a color change by hitting a URL with some parameters telling it the color.

It was simple to integrate. We're using CruiseControl.NET to drive our NAnt builds, and in the build script we simply did this:

<project name="MyProject" default="build">
    <property name="nant.onsuccess" value="success"/>
    <property name="nant.onfailure" value="failure"/>

    <target name="build" description="builds the system">
        ...
    </target>

    <!-- invoked automatically when build is successful -->
    <target name="success" description="Target to run when build was successful">
        <echo message="Woo Hoo, the build was successful!" />
        <get src="
https://myambient.com/java/my_devices/submitdata.jsp?devID=123-456-789&amp;color=12&amp;anim=0&amp;comment=build+succeeded" dest="out.html" failonerror="false"/>
    </target>

    <!-- invoked automatically when a build fails -->
    <target name="failure" description="Target to run when build failed">
        <echo message="Oh Oh, where's that build monkey?" />
        <get src="
https://myambient.com/java/my_devices/submitdata.jsp?devID=123-456-789&amp;color=0&amp;anim=2&amp;comment=build+failed" dest="out.html" failonerror="false"/>
    </target>

</project>

Comments

Scott Hanselman said:

That's SO awesome. I've got to get one...
# April 8, 2004 2:59 PM

TrackBack said:

# April 8, 2004 7:19 PM

The Sim said:

wicked cool!
# April 9, 2004 12:00 AM

Nick! said:

Is it possible to do this GET with the basic service rather than paying for the Premium service? Their site seems to indicate you have to pay in order to do this. :(
# April 13, 2004 11:10 AM

Loren H said:

Unfortunately we did have to sign up for the premium service and pay about $80 a year.

https://www.myambient.com/java/my_devices/help.jsp#25 says:

The premium account is $6.95 a month or $19.95 a quarter. This is for unlimited usage and access to all the premium channels for your Ambient Device

The other thing to know is that it can take quite a few minutes for the orb to receive the message and change color. So it isn't instantaneous.
# April 13, 2004 12:09 PM

TrackBack said:

# April 30, 2004 3:13 AM

Rajesh Patel said:

Rather than spending $80 a year for the premium service why not spend $40 bucks to get the developer kit:
http://www.ambientdevices.com/developer/

Plus updates would be instantaneous.
# May 13, 2004 1:46 PM

TrackBack said:

# June 30, 2004 1:50 PM

TrackBack said:

# June 30, 2004 1:50 PM

TrackBack said:

# August 27, 2004 10:35 AM

TrackBack said:

# September 1, 2004 12:09 PM