Continuous Integration with Hudson
Continuous integration is reliable method in the software development life cycle that has evolved over time. The primary goal of CI is to frequently integrate the isolated code changes done by the members of a team. Based on the size of the team there could be multiple integration per day, each integration triggers an automated build process [build, unit test, code coverage, code analysis etc] and providing an instant feedback so that if a defect is introduced, it can be identified and corrected at an early stage. Continuous integration aims at preventing the defects from piling up, reducing the risk of project delays and improving the quality of software.
Setting up Hudson
- Download the Hudson war file from http://hudson-ci.org/.
- Run the command java -jar hudson.war from the command prompt.
- From the browser type http://localhost:8080/ to start the Hudson dashboard.
- Select Manage Hudson link and click on Install as Windows Service to install Hudson as a windows service which helps in easily starting and stopping the Hudson service.
- Once the Windows service is installed the service can be started from Services mmc snap in.
Creating a Job
- Browse to Hudson Dashboard and click on New Job.
- Enter a desired Job Name and select Build a free-style software project and click on OK.
- In the configuration page enter a desired Project Name and description.
- Select Visual Source Safe under Source Control Management. Hudson supports all popular source control management system, so you could use the scm tool of your choice.
- Enter the Server Path, User Name, Password and VSS Folder Path. Select Fetch the files in recursive order check box.
- Under the Build Section click on Add build step button and select Build a visual studio project or solution using MSBuild.
- Select the MsBuild Version, MsBuild Build File path [Select the .sln file]
- Click on Save to finish configuring the Job.
- Click on Schedule a Build Icon on the left to force build the project.
- Once the job finishes building, the success or failure of the project is reported as shown below in the screenshot.
- Click on the Last Success link and select Console Output link to check for any build errors.
- Based on the plugins installed you can also configure other reports such as unit tests, code coverage and code analysis. You can also send out email notifications of the build results.