CCNetConfig

Continuous Integration, Simplified Configuration

Home | Wiki | About | Login | Contact |
subscribeSubscribe
Subscribe
CCNetConfig
Releases
Beta Releases
Stable Releases
Work Items
Discussions
CPRP
Releases
Beta Releases
Stable Releases
RSS Builds Publisher
Releases
Beta Releases
Stable Releases
Current Release
0.5.0.120
Sun, Jan 20 2008 at 10:02 PM
All Releases
CCNetConfig Build Status
  • Build StatusSuccess
  • Label0.6.420.32915
  • Last Build4/28/2008 6:43 AM
  • Next Build7/24/2008 12:00 AM
Recent Work Items
  • Automated: Unhandled exceptio…
  • Automated: Object reference n…
  • support for SvnRevisionLabell…
  • Automated: Uncommon behaviour…
  • Automated: create a new confi…
  • Copying and pasting a task do…
  • Automated: Invalid URI: The U…
  • Automated: Cannot import a nu…
  • Remove support for plugins in…
  • Show splash screen on initial…
Legend: Proposed Active Fixed Closed
Tag Cloud
  • A Little Class
  • Automation
  • C#
  • CCNet
  • CCNetConfig
  • codeplex
  • CodePlexAPI
  • Continuous Integration
  • CruiseControl.NET
  • feedburner
  • google
  • JSON
  • LOLCode
  • MSBuild
  • RssBuildsPublisher
  • Sandcastle
  • subtext
  • subversion
  • SvnLabeller
  • tfs
  • twitter
  • Visual Studio
  • Wix
  • XML
  • xna
more tags...
Archives
  • July, 2008 (2)
  • May, 2008 (3)
  • April, 2008 (5)
  • March, 2008 (8)
  • February, 2008 (6)
  • January, 2008 (7)
  • December, 2007 (11)
  • November, 2007 (7)
  • October, 2007 (5)
  • September, 2007 (8)
  • August, 2007 (5)
  • June, 2007 (7)
  • May, 2007 (5)
  • April, 2007 (23)
  • March, 2007 (27)
  • February, 2007 (12)
  • January, 2007 (9)
  • December, 2006 (2)
  • November, 2006 (12)
  • October, 2006 (17)
  • September, 2006 (8)
  • August, 2006 (30)
 
Image Galleries
  • Screenshots
  • A Little Class
Post Categories
  • Announcements
  • Automation
  • Beta
  • Beta Marker
  • C#
  • CCNetConfig
  • CCNetConfig.BugTracking
  • CCnetConfig.CCNet
  • CCNetConfig.Core
  • CCNetConfig.GUI
  • CCNetConfig.Updater
  • CCNetConfig.Updater.Core
  • CodePlex
  • CodePlex Release Publisher
  • CodePlexAPI
  • Continuous Integration
  • CruiseControl.NET
  • Extending CCNetConfig
  • MSBuild
  • MsBuild Extended Tasks
  • News
  • Nightly
  • Orcas
  • Project Extension
  • Rant
  • Reflector
  • Release
  • RssBuildsPublisher
  • Sandcastle
  • SubText
  • SubVersion
  • TFS
  • TFS Plugin
  • Tools
  • TortiseSVN
  • Vista
  • Visual Studio
  • Wiki
  • Wix
  • XAML
  • Xbox Live
  • Zune
 

Blog Statistics
  • Posts219
  • Articles0
  • Comments36
  • Trackbacks5
Home
Download
Screenshots
Support
License
Source

December 2007 Entries

CC.NET to CCNetConfig Plugin Generator
I put together a little utility that I will add to the build process and distribute with CCNetConfig that will take an assembly that is a plugin for CruiseControl.NET and build an assembly that can be used with CCNetConfig. I have not really tested a full list of plugins, but i have tested the SVNLabeller and the TFS plugin. I will test more of them when I have time to do so, and if there are any issues, they will be addressed just like any other issue with CCNetConfig.

Here is a sneak peak of the UI. It's nothing too fancy. You select the CruiseControl.NET plugin assembly, then you can specify some properties for the plugin itself and its properties. You can load multiple CruiseControl.NET plugin in assemblies and they will all be included in the one generated assembly.

CCNetCOnfig Plugin Creator

Here i am creating the SVNLabeller and setting a minimum version of CruiseControl.NET that is supported. I am also setting the Url for any documentation about this plugin.

If we click the build button in the toolbar, the new assembly will be created. It will ask where to save it. I saved it in my CCNetConfig install directory. Now if I start up CCNetConfig and I view the components that are supported in the Options dialog, we see the following:



Clicking on the save button will generate the source files but will not create the assembly. Below is an example of the generated source. You may notice that it looks a lot like the code from the example on how to write the plugin yourself.

Code

1using System; 2using System.Collections.Generic; 3using System.Text; 4using CCNetConfig.Core; 5using CCNetConfig.Core.Components; 6using System.ComponentModel; 7using System.Drawing.Design; 8using System.Xml; 9 10namespace ccnet.SvnLabeller.plugin ...{ 11 [Plugin, MinimumVersion ( "1.2.1.0" ),] 12 public class SvnLabeller : CCNetConfig.Core.Labeller, ICCNetDocumentation ...{ 13 public SvnLabeller ( ) : base ( "SvnLabeller" ) ...{ } 14 15 private System.Int32? _MajorVersion; 16 [Category ( "Optional" ), 17 DisplayName ( "MajorVersion" ), 18 DefaultValue ( null ), 19 Description ( "" ),] 20 public System.Int32? MajorVersion ...{ 21 get ...{ return _MajorVersion; } 22 set ...{ _MajorVersion = value; } 23 } 24 25 private System.Int32? _MinorVersion; 26 [Category ( "Optional" ), 27 DisplayName ( "MinorVersion" ), 28 DefaultValue ( null ), 29 Description ( "" ),] 30 public System.Int32? MinorVersion ...{ 31 get ...{ return _MinorVersion; } 32 set ...{ _MinorVersion = value; } 33 } 34 35 private System.Int32? _BuildNumber; 36 [Category ( "Optional" ), 37 DisplayName ( "BuildNumber" ), 38 DefaultValue ( null ), 39 Description ( "" ),] 40 public System.Int32? BuildNumber ...{ 41 get ...{ return _BuildNumber; } 42 set ...{ _BuildNumber = value; } 43 } 44 45 private System.String _executable; 46 [Category ( "Required" ), 47 DisplayName ( "(executable)" ), 48 DefaultValue ( null ), 49 Description ( "" ),] 50 public System.String executable ...{ 51 get ...{ return _executable; } 52 set ...{ _executable = CCNetConfig.Core.Util.CheckRequired ( this, "executable", value ); } 53 } 54 55 private System.String _workingDirectory; 56 [Category ( "Required" ), 57 DisplayName ( "(workingDirectory)" ), 58 DefaultValue ( null ), 59 Description ( "" ),] 60 public System.String workingDirectory ...{ 61 get ...{ return _workingDirectory; } 62 set ...{ _workingDirectory = CCNetConfig.Core.Util.CheckRequired ( this, "workingDirectory", value ); } 63 } 64 65 public override CCNetConfig.Core.Labeller Clone ( ) ...{ 66 SvnLabeller _SvnLabeller = this.MemberwiseClone ( ) as SvnLabeller; 67 _SvnLabeller.executable = this.executable.Clone ( ) as System.String; 68 _SvnLabeller.workingDirectory = this.workingDirectory.Clone ( ) as System.String; 69 return _SvnLabeller; 70 } 71 72 public override void Deserialize ( System.Xml.XmlElement element ) ...{ 73 string s = string.Empty; 74 if ( string.Compare ( element.GetAttribute ( "type" ), base.TypeName, false ) != 0 ) ...{ 75 throw new InvalidCastException ( string.Format ( "Unable to convert {0} to a {1}", 76 element.GetAttribute ( "type" ), base.TypeName ) ); 77 } 78 79 this.MajorVersion = null; 80 s = CCNetConfig.Core.Util.GetElementOrAttributeValue ( "MajorVersion", element ); 81 if ( !string.IsNullOrEmpty ( s ) ) ...{ 82 int i = 0; 83 if ( int.TryParse ( s, out i ) ) ...{ 84 this.MajorVersion = new int? ( i ); 85 } 86 } 87 88 this.MinorVersion = null; 89 s = CCNetConfig.Core.Util.GetElementOrAttributeValue ( "MinorVersion", element ); 90 if ( !string.IsNullOrEmpty ( s ) ) ...{ 91 int i = 0; 92 if ( int.TryParse ( s, out i ) ) ...{ 93 this.MinorVersion = new int? ( i ); 94 } 95 } 96 97 this.BuildNumber = null; 98 s = CCNetConfig.Core.Util.GetElementOrAttributeValue ( "BuildNumber", element ); 99 if ( !string.IsNullOrEmpty ( s ) ) ...{ 100 int i = 0; 101 if ( int.TryParse ( s, out i ) ) ...{ 102 this.BuildNumber = new int? ( i ); 103 } 104 } 105 106 this._executable = null; 107 s = CCNetConfig.Core.Util.GetElementOrAttributeValue ( "executable", element ); 108 if ( !string.IsNullOrEmpty ( s ) ) ...{ 109 this.executable = s; 110 } 111 112 this._workingDirectory = null; 113 s = CCNetConfig.Core.Util.GetElementOrAttributeValue ( "workingDirectory", element ); 114 if ( !string.IsNullOrEmpty ( s ) ) ...{ 115 this.workingDirectory = s; 116 } 117 } 118 119 public override System.Xml.XmlElement Serialize ( ) ...{ 120 XmlDocument doc = new XmlDocument ( ); 121 XmlElement root = doc.CreateElement ( "labeller" ); 122 root.SetAttribute ( "type", base.TypeName ); 123 124 XmlElement ele = null; 125 126 if ( this.MajorVersion.HasValue ) ...{ 127 ele = doc.CreateElement ( "MajorVersion" ); 128 ele.InnerText = this.MajorVersion.Value.ToString ( ); 129 root.AppendChild ( ele ); 130 } 131 132 133