Home > Continuous Integration > Continuous Integration with Hudson

Continuous Integration with Hudson

Introduction
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

  1. Download the Hudson war file from http://hudson-ci.org/.
  2. Run the command java -jar hudson.war from the command prompt.
  3. CommandPrompt

  4. From the browser type http://localhost:8080/ to start the Hudson dashboard.
  5. hudsondashboard

  6. 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.
  7. installwindowsservice

  8. Once the Windows service is installed the service can be started from Services mmc snap in.
  9. servicessnapin

Creating a Job

  1. Browse to Hudson Dashboard and click on New Job.
  2. Enter a desired Job Name and select Build a free-style software project and click on OK.
  3. newjob

  4. In the configuration page enter a desired Project Name and description.
  5. jobconfigure

  6. 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.
  7. Enter the Server Path, User Name, Password and VSS Folder Path. Select Fetch the files in recursive order check box.
  8. scmconfig

  9. Under the Build Section click on Add build step button and select Build a visual studio project or solution using MSBuild.
  10. build

  11. Select the MsBuild Version, MsBuild Build File path [Select the .sln file]
  12. msbuildfile

  13. Click on Save to finish configuring the Job.
  14. Click on Schedule a Build Icon on the left to force build the project.
  15. scheduleabuild

  16. Once the job finishes building, the success or failure of the project is reported as shown below in the screenshot.
  17. buildresults

  18. Click on the Last Success link and select Console Output link to check for any build errors.
  19. consoleoutput

  20. 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.
Categories: Continuous Integration Tags:
  1. No comments yet.
  1. No trackbacks yet.