Dashboard > CruiseControl.NET > ... > Documentation > Custom Builder Plug-in
Custom Builder Plug-in Log In View a printable version of the current page.  
CruiseControl.NET documentation for latest CI builds
Added by Owen Rogers , last edited by Gary Feldman on Sep 25, 2006  (view change) show comment

Steps:

  1. Create a Class Library project to build the assembly that will contain your custom builder plug-in. The assembly that it produces should be named: 'ccnet.*.plugin.dll' (where the star represents the name you choose).
  2. Add your new custom builder class.
  3. The class must implement the ThoughtWorks.CruiseControl.Core.ITask interface (found in the ccnet.core assembly).
  4. Mark your class with the NetReflector ReflectorType attribute. The name argument supplied to the attribute is the name of the element/attribute that will appear in the configuration file.
  5. Add any configuration properties that you need, marking them with the NetReflector ReflectorProperty attributes accordingly. Note that the attribute names are case sensitive and must match exactly in the configuration.
  6. Implement the Run method. The supplied IntegrationResult should provide you with everything that you need to know about the current build.
  7. Compile the assembly.
  8. Copy the assembly into the folder containing the CruiseControl.NET assemblies (or the current directory that you are running the ccnet server from).
  9. Modify your ccnet.config file in accordance with the sample config file below.

For more information, please take a look at the sample code contained in the folder /docs/developer/samples.

Sample Builder Class

using System;
using Exortech.NetReflector;
using ThoughtWorks.CruiseControl.Core;

namespace ThoughtWorks.CruiseControl.Sample.Builder
{
	[ReflectorType("mybuilder")]
	public class NAntBuilder : ITask
	{
		public void Run(IntegrationResult result)
		{
			Console.WriteLine("Hello World!");
		}
	}
}

Sample Config File

<cruisecontrol>
	<project name="myproject">
		<tasks>
			<mybuilder>
				<!-- include custom builder properties here -->
			</mybuilder>
		</tasks>
	</project>
</cruisecontrol>

You think I could get an example of said custom build properties. Do these properties involve passing arguments to the plugin or setting fields in the plugin class?

-ChazZ

Posted by Anonymous at May 05, 2004 13:22

How would one go about making a plugin for a custom source control provider? Do these instructions roughly apply (but implementing ISourceControl instead of IBuilder?)

Posted by Anonymous at Aug 27, 2004 14:40

Oh, my email is nospamplease75@yahoo.com. I asked the last question.
http://haacked.com/

Posted by Anonymous at Aug 27, 2004 14:41
Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators