Telerik blogs

We have a fairly automated builds at telerik.  You keep everything in VSS, and the moment you need a build, you just check-in your latest changes and launch the build script.  The build runs on our integration machine and produces the final deliverables.

Now the build might take some time for a few of the products (I wish VSS was not so darn slow!).  I get the build results and the log of the NAnt scripts by email, but sometimes that is not fast enough.  The answer to my problems came when I switched to Miranda as my IM client.  Miranda has a lovely plugin, NotifyAnything, that will let you push notifications from various sources and have them displayed on your screen.  I do keep my IM client running all the time, so it looks like the perfect place to get build notifications.

NotifyAnything listens on a local TCP port (UDP is an option too) and has a fairly simple protocol for accepting messages.  For a simple message, you just need to send the message string, prepended by a "%" in order to get recognized as a message.  Not adding the percent symbol will get your message delivered, but it will be marked as a notice, and those look uglier.  A couple of lines in Ruby got me this:

require 'socket'

host = ARGV[0]
message = ARGV[1]

TCPSocket.open(host, 12001) do |socket|
    socket.write "%" + message
end

I won't go into details, the script gets the host and the message string from the command line and just sends them over the wire.  I added a call to it at the end of the build script and that was it.  The final result looks like this:


Comments

Comments are disabled in preview mode.