This page last changed on Oct 13, 2004 by mroberts.
 The Project Report Web Application will be deprecated in a not-to-far-away release. The plugins for the replacement project reporting will use a different API.

CruiseControl.NET offers the ability to add 'plugins' to the Project Report Web Application. 2 types of plugin are available :

  • Project plugins: which do not correspond to any particular build. They are available on the global toolbar at the top of the screen.
  • Build plugins: which reflect the results of one build. They are available on the build toolbar on the build results screen

CruiseControl.NET ships with project and build plugins, e.g.
  • 'project stats' is a project plugin
  • 'test timing' is a build plugin, and shows the times taken for each unit test for a given build

Creating a plugin

A project or build plugin is simply a webpage, so you can create any html page and use it as a plugin. A more powerful option though is to create a ASP.NET page and deploy it as part of the main CCNet web application. To build and deploy such a plugin:
  • Create a new ASP.NET development project (e.g. in Visual Studio) to contain your plugins
  • Create a new ASP.NET page for your new plugin
  • Add your content to the page, using the following ideas:
    • The log directory location is available in the appSettings of the Web Apps configuration, under the logDir key.
    • If you are generating a build plugin, the log file name will be passed in as a URL parameter called log
    • The CCNet API will be available to you if necessary - consult the CCNet source for details
      *Build your project
      *Deploy your plugin as follows:
    • Deploy the CCNet Web App as normal
    • Deploy your .aspx and other web content files to the CCNet Web App directory.
    • Deploy your built binary files to the CCNet Web App's bin folder
    • Add any custom configuration for your plugin to the CCNet Web App's web.config file

For examples of plugins, consult the 'web' project in the CCNet source, looking at the examples mentioned above.

Configuring CruiseControl.NET to use a plugin

Plugins are configured in the web.config file. An example config file is as below:
		<plugin linkText="project stats" linkUrl="Statistics.aspx" />

		<plugin linkText="test details" linkUrl="Tests.aspx?/log=" />
		<plugin linkText="test timing" linkUrl="TestTiming.aspx?/log=" />
		<plugin linkText="original log" linkUrl="log/" />

So, to add your own plugin simply add an entry in the appropriate section, setting the following attributes:
  • linkText is the text that will appear in the toolbar as a link to your plugin.
  • linkUrl is the location of your plugin, relative to the CCNet Web App location.
Document generated by Confluence on Jun 26, 2005 17:22