Integration continue avec Hudson

(Cette page n'existe actuellement qu'en anglais)

Partie 1: Continuous Integration with Hudson

Sommaire
Partie 1: Continuous Integration with Hudson
Partie 2: Hudson Workflow and Plug-ins
Partie 3: How To Install Hudson

Continuously building the project and testing that it works is pretty much what continuous integration is about. Hudson will help you answer the questions: Is the current code building correctly? All tests passed? How clean is the code?

Requirements for continuous integration:

  • A version controlled source code (under Git/Mercurial/Subversion/...)
  • Unit tests, or you'll be missing the point
  • A machine to run Hudson (anything supporting Java and capable of building your project[1])

Why Hudson? What does it do?

Hudson may not have the most sexy interface, but it is one of the simplest, most generic, stable, and improving (and it's free). Hudson is a Java application. Once running, you'll have access to Hudson's the web interface and command-line interface.

Hudson is not a "builder", like, let's say, Visual Studio. What Hudson does, is executing command lines which generate reports, and reading those reports (plus graphing them over time). Most likely you'll give Hudson the command line directly (e.g., "make build", or "phpunit my_tests"), or you'll tell it to use Ant. Ant means you'll create a small XML file where you write each command to execute in Ant's format. It has some advantages over the pure command line; try it! In short, Hudson doesn't generate your XML reports files, it only analyses and displays them.

So here is how it goes

  1. You setup Hudson
  2. Periodically or when you commit some files to your repository, Hudson executes your pre-defined commands
  3. Those commands will generate some report files (usually XML files)
  4. The Post-Build actions of your Hudson project will read those generated files and you'll have access to them from Hudson's interface. Now for each project you can see the last builds status.

A few screenshots of Hudson's interface

Screenshot of a Hudson's start page

Screenshot of a Hudson's project page

Screenshot of a Hudson's project build page

More details of the Hudson process follow in the second part of this article.

1: You may also use a virtual machine to do that.
Partie suivante Hudson Workflow and Plug-ins

Parties : 1, 23Suivante