concept Hudson in category android

appears as: Hudson
Android in Practice

This is an excerpt from Manning's book Android in Practice.

Technique 85: Continuous builds with Hudson

Hudson, the friendly butler, is one of the most popular build servers these days. This can largely be attributed to it being open and free, highly extensible, easy to use, and a nobrainer to set up. If you think we’re going to torture you with pages of installation instructions here, be relieved; we won’t—it’s not necessary. Hudson is great at managing itself, once started. It can update itself at the click of a button, or install new plugins that will extend its functionality. If you were wondering whether Hudson is bound to any specific kind of underlying build system, source code management (SCM) system, or even operating system, the answer is no. Hudson builds stuff, from some source, on some machine. You need to tell it what to build, where to get it, and how it’s being built. Whenever you have to bridge the way to some specific technology, such as using Git for SCM or Maven for builds, you can rely on the vast supply of plugins for Hudson.

Figure 14.11. The blue ball indicates a successful build. If you don’t like that and aren’t suffering from dyschromatopsia, you can change the color to green by installing the Green Balls plugin, which is the first thing most people do after installing Hudson.

If you haven’t already downloaded and installed Hudson, do that now. If you’re toying around, it’s sufficient to download hudson.war from http://www.hudson-ci.org and start it using:

$java -jar hudson.war

That will boot up Hudson and make it available in your browser of choice at local-host:8080. It’s that easy; we told you! Next, we need to install the Android emulator plugin. Hudson is completely self-contained, so you install plugins from within Hudson. This is done by going to Hudson > Manage Hudson > Manage Plugins > Available, finding and checking Android Emulator Plugin (it’s listed under Build Wrappers), and clicking Install. Your list of installed plugins should now look similar to what’s seen in figure 14.12. Note that you need to restart Hudson for changes to take effect.

Figure 14.12. Hudson is completely self-contained. You can configure everything within Hudson itself, including the installation of new plugins. Note that plugin dependencies will automatically be resolved and installed for you.

We’re now ready to set up a new build configuration. Hudson calls build configurations jobs, so go to Hudson > New Job. We call the job “HelloAnt”, same as the project name, and select the Free-style Software Project configuration. This is the most simple and flexible one. Though this configuration can build any project, including Maven projects, for Maven you should choose the Maven2/3 configuration, because it’s more convenient for Maven builds (this requires the Maven plugin to be installed). Figure 14.13 shows the job setup screen.

Figure 14.13. Hudson supports different kinds of job configurations. Select the Free-style configuration whenever you need utmost flexibility or no extra features specific to a particular build system.