`

(Forward)Continuous Integration with Hudson - Tutorial

阅读更多

Source: http://www.vogella.de/articles/ContinuousIntegration/article.html

 

Continuous Integration with Hudson - Tutorial

Lars Vogel

 

Version 0.5

 

02.02.2010

Hudson

This article describes how to build a continuous integration cycle for Java development.

This article is currently in DRAFT.


1. Continuous Integration with Hudson

1.1. Continuous Integration Overview

Continuous integration is a process in which all development work is integrated at a predefined time or event and the resulting work is automatically tested and build. The idea is that development errors are identified very early in the process.

1.2. Hudson

Hudson is one open source tool to perform Continuous Integration. The basic functionality of Hudson is to monitor a SCM (Source Control System) and if changes occurs to start and monitor a build system (for example Apache Ant or Maven). Hudson will monitor the whole process and provide reporting functionality and notification functionality to report success or errors.

Hudson can be extended by additional plugins.

1.3. Requirements for using Hudson

To use Hudson you need:

  • An accessible source code repository, e.g. subversion, with your code checked in.

  • A working build script, e.g. ant script, checked into the respository

  • A webapplication server, e.g. Tomcat, to run Hudson

 

 

Tip

Hudson works also without webapplication server but I focus on the more common case.

 

2. Installation

2.1. Apache Ant, Tomcat

Install Tomcat. See Apache Tomcat Tutorial .

For the usage of Hudson you need to setup Apache Ant as a build tool. See Using Apache Ant for details.

2.2. Hudson

Download the "hudson.war" file from Hudson Homepage and put the it into your Tomcat "webapps" directory. If you start Tomcat your Hudson installation should be available under "http://localhost:8080/hudson/".

2.3. Configure Hudson

Before using hudson you need to tell it where your JDK and ant installation is. Go to Hudson under "http://localhost:8080/hudson/" and click "Manage Hudson" and then "Configure System"

 

 

Maintain the correct path to your JDK and Ant installation and press "Save" below.

 

 

2.4. Using svn and Hudson behind a proxy

See Hudson FAQ for a description how to configure the http proxy for svn in Hudson.

3. Version control systems

Hudson supports out of the box subversion and cvs but you find Hudson connectors for almost every SCM system.

The following will use svn as an example. You specify the svn URL during project setup.

4. Setting up a Hudson job

Select "New Job" and select "Freestyle Job".

 

 

Select "subversion" and maintain your svn URL. The system will give an error message that you need to maintain the credential. Click on the link and maintain your user and password.

5. Thank you

Thank you for practicing with this tutorial.

 

Please note that I maintain this website in my private time. If you like the information I'm providing please help me by donating.

7. Links and Literature 7.1. Source Code http://www.vogella.de/code/codejava.html Source Code of Examples 7.2. Hudson links https://hudson.dev.java.net/ Homepage of the Hudson continuous integration engine 7.3. PDE/Build links https://www6.software.ibm.com/developerworks/education/j-junit4/index.html http://it-republik.de/jaxenter/artikel/Die-RCP-Anwendung-am-laufenden-Band-1306.html PDE Build description (German) www.eclipse.org/pde/pde-build Eclipse PDE/Build http://www.eclipse.org/articles/Article-PDE-Automation/automation.html Build and Test Automation for plugins and features http://rcpquickstart.com/2007/06/06/getting-started-with-pde-build/ Getting started with PDE/Build http://aniefer.blogspot.com/2008/06/example-headless-build-for-rcp-product.html
0
0
分享到:

相关推荐

Global site tag (gtag.js) - Google Analytics