Posts Tagged ‘hudson’

NFJS Rocky Mountain Software Symposium Debrief

November 17th, 2008

This weekend I attended the NFJS Rocky Mountain Software Symposium in Lone Tree, CO.  It was hard to pass up a NFJS conference that’s 15 minutes from home.  Overall the sessions were excellent.  There wasn’t a single session I attended that sucked or was a waste of time, a first for any conference I’ve attended.  I seemed to gravitate toward sessions by Ken Sipe and Stu Halloway followed by Groovy and Grails presentations by Jeff Brown and Scott Davis.

I gleaned several consistent overarching themes at the conference:

  • Java is essentially Dead (Stu Halloway leading this sentiment)
  • BUT the JVM is alive and well.  In fact the JVM has transitioned from a write once run Java anywhere runtime to a dynamic platform for many languages (Groovy, JRudy, Scala, Clojure, Javascript, etc…. oh yeah and Java)
  • Not doing Test Driven Development is basically irresponsible, especially with the explosion of dynamic languages
  • Not doing Continuous Integration is basically irresponsible

I learned the Jeff Brown has developed and is about to announce a new Hudson plugin for building Grails projects in Hudson, a big and welcome improvement on specifying new ant targets, using the shell script option or whatever.  Jeff also echoed much of what has already been said about the recent Spring Source acquisition of G2:

  • Deeper integration between Grails and Sprint MVC
  • The Groovy Spring bean builder will be moved into Spring
  • And of course there will be closer collaboration between the Groovy, Grails, and Spring development teams, though the team will remain distinct.

I’m super excited about Git though Matt McCullough urged me to take a look at Mercurial

Anyway, fantastic event and kudos to No Fluff Just Stuff.

Building Grails Applications with Hudson

January 21st, 2008

I’m never surprised by the shear magnitude of stuff I don’t know about. Last week I stumbled upon Hudson as I was searching for help to configure Cruise Control to build and execute tests for my a Grails application. I found this post that introduced me to Hudson and got me started.

Let me first say that I was off to find a free solution. If I had the luxury of spending a little cash at this point I would have used Bamboo. I’m a big fan of Atlassian products and love what they are doing to integrate Jira, Fisheye, Bamboo, Crucible, Clover and Confluence. The traceability of code to issues to change sets to builds and tests is really cool. Anyway I digress.

So I found Hudson, and I was pleasantly surprised how easy it was to set up. I’m running on Windows with Tomcat 6 and JDK1.6. I simply deployed the Hudson WAR, and I was off to the races. Hudson’s configuration is all done via a web interface and the interface itself is very clean, especially compared to Cruise Control.

In Hudson I created a new job, selected SVN in the source code management section and entered the URL to my Grails app in the repository. Hudson also lets you configure a repository browser (ViewSVN, Fisheye, WebSVN or Sventon). Since I was already running Tomcat, I chose Sventon and quickly downloaded and deployed the WAR for Sventon. I set Hudson to poll SVN for changes every minute and for the build itself I told Hudson to use Ant (you need to set up ANT first in Hudsson) and pointed to the Grails build.xml.

I created two new targets in the build.xml: ‘all’ and ‘deploy’. The all target chains the depended targets together. I had originally had Hudson call test, war, deploy and doc separately but each invoked a compile separately.

<target name="all" depends="war, test, deploy, doc"
  description="build, test, deploy and build the javadoc"/>

I also created a deploy target that takes the war and deploys to Tomcat and property to specify the grails_env.

Under Post-build Actions I set the following properties:

  • Files to Archive = “**/*.war”
  • Javadoc Directory = “GRAILS-APP/docs/gapi”
  • Test Reports XMLs = “GRAILS-APP/test/reports/*.xml”

So in about an hour I had Hudson continually building, running my test cases, generating javadoc and deploying my WAR to Tomcat, and it was all relatively painless. Here’s what the job status screen looks like:
Hudson Screenshot

Going forward I’ll probably investigate using GANT instead of ANT, otherwise it’s serving the purpose.

Powered by Web Design Company Plugins

Switch to our mobile site