Jive development - local build status

Version 1

    This is something I threw together the other day for my own amusement. Other developers might find it an interesting idea (or a totally silly, over the top, thing to do).


    Our team mostly uses Windows 7 for local development, then the code is checked into svn for an automated build process on a Unix box. When developing features, customising code, and fixing bugs we're restarting our local dev environments a fair amount & I found it useful to know how long it'd be until the Jive app was available.


    We use a bunch of helper scripts to;


    • Stop the app server
    • Build a plugin & on success install it to the d/b directly (no messing with the plugin upload page.. useful when the app isn't running)
    • Build the whole app, and start the app if it doesn't error
    • Start the app server
    • Ping the welcome page when the build is up (which helps get everything loaded into memory & get soy compiled)


    I've recently added a bunch of extra commands to these helper scripts that write to a small XML file that records what's going on;





    What we can then do is read this using another app.. in my case I like the Windows Sidebar gadgets on my 24" monitor, so I hacked together a quick gadget to surface the information from the XML file. It updates itself every 5 seconds. You could do something similar in other widget/gadget frameworks like Rainmeter.






    set-progress.cmd -- I could/should have put this in set-progress.vbs, but didn't

    @echo off
    echo ^<status^>^<percent^>%1^</percent^>^<msg^>%2^</msg^>^</status^> > c:\jive\web\build-progress.log


    set-progress.vbs -- call set-progress.cmd but hide the command window that usually pops up

    Set oShell = CreateObject ("Wscript.Shell") 
    Dim strArgs
    strArgs = "cmd /c C:\jive\web\set-progress.cmd " + Wscript.Arguments(0) + " " + Wscript.Arguments(1)
    oShell.Run strArgs, 0, false


    Now you can call set-progress.vbs from your other scripts.. scatter them around liberally so that your widget knows what's going on. In our app start script (a .cmd file), it'd look like this..


    call c:\windows\system32\wscript.exe C:\jive\web\set-progress.vbs 0 Initialising





    The stuff above gives you part of the picture.. you can now work out how far through the startup process the app server is by using a feature in LogExpert. We run LogExpert in the background to spool sbs.log. It has a feature called 'Highlighting & Triggers', so you can trigger an executable when a certain phrase is seen.. in our case, we can scroll through and find certain phrases spaced out by approx a minute (could be any amount of time).


    I set up about 9 phases to spot, each trigger the 'set-progress.vbs' script with a percentage + message...