Extension points

Hudson defines extensibility points, which are interfaces or abstract classes that model an aspect of a build system. Those interfaces define contracts of what need to be implemented, and Hudson allows plugins to contribute those implementations.

Currently the following extensibility points are available. See javadoc for more details about how to register an implementation, as well as what the contracts are:

Publisher

Publishers run after a build is completed by Builder(s), and they are usually used to collect information out of the build. Built-in publishers include JUnit test result reporter, artifact archiver, fingerprint recorder, and so on.

Builder

Builder performs the build. It's really open-ended, but typically a builder drives other programs to build software. Built-in builders include Ant, Maven, and shell script.

SCM

SCM is Hudson's interface with the source code control system. An SCM performs check-out operation, compute changes since the last build, and so on. Built-in SCMs include CVS and Subversion.

Trigger

Trigger is a polling mechanism that is usually used to start a new build of a project. Built-in triggers include timer trigger and SCM polling trigger.

Action

Action is attached to other prominent model objects (such as Job and Run) and expose additional data to users when they are seeing jobs and runs. For example, recorded JUnit test result becomes an action on a Build object, so when you are looking at a build page, it will show you a link to the JUnit report. Most Publishers and Triggers use this mechanism to expose data.

Job

Job represents a "project" on Hudson — each job shows up as one line in the top page. This extensibility point allows you to define your custom "project" type. For example, since Maven POM contains most of the information a build system ever needs, so one could write a custom "Maven project" type. Configuration of such a project could be made significantly easier than the current general-purpose project configuration screen (and such a plugin is also likely to define its own extensibility points.) Contributing to this extensibility point is more work, but this enables many interesting possibilities. Bulit-in job implementations include an external job monitoring project and the general-purpose software build project.

MavenReporter

MavenReporter is the equivalent of Publisher for the native maven2 project type. This extension point gets a chance to listen to ongoing Maven builds. Typically, when a certain mojo is executed, the reporter can collect information and do something useful.

BuildWrapper

BuildWrapper can be used to perform pre-processing and post-processing for the build process. This is often used to set up an environment for a build, such as a local X server, an application server, etc.

Labels

  Edit Labels
(None)