Blog Publisher for CruiseControl.NET
Some time ago I wrote a blog publisher for CruiseControl.NET, but didn’t manage to blog about it. In fact, it totally slipped my mind. However, my machine behaves more and more weird lately, so I started to clean up the hard disks and back up all my data. So today it happened that I stumbled over my old blog publisher and finally posted it here.
Background: CruiseControl.NET (CC.NET) is a continuous integration server for .NET. Publishers are tasks that are executed by CC.NET after a build is done, and are primarily used to report the build results, e.g. by sending emails.
There are instructions on how to write your own publisher available, so I created one which posts the build results to a blog. It stood to reason to access the blog using MetaWeblog API. Fortunately, Charles Cook wrote the XML-RPC.NET library, so my publisher degenerated to a simple gateway [;)]
The installation is simple: just drop the assemblies from the ZIP file to the server
folder of CC.NET and restart the server. CC.NET uses a fixed naming scheme to find all extensions, that’s why the assembly has that weird name ccnet.BlogPublisher.plugin
.
The minimal configuration just takes details required to access a particular blog:
<publishers>
...
<blog>
<url>http://localhost/MetaWeblog url</url>
<blog>blog</blog>
<username>username</username>
<password>password</password>
</blog>
With this configuration the publisher uses the default XSL files to transform the build results before posting them. But if you want to change the content of the blog post, you can specify which XSL files should be used. Additionally you can specify categories for the post:
<publishers>
...
<blog>
<url>http://localhost/MetaWeblog url</url>
<blog>blog</blog>
<username>username</username>
<password>password</password>
<categories>
<category>category 1</category>
<category>category 2</category>
</categories>
<xslFiles>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
<xslFile>xsl\msbuild2ccnet.xsl</xslFile>
</xslFiles>
</blog>
The assembly is built with .NET 2.0, but it shouldn’t be too difficult to change that. I even put the .NET 1.1 version of XML-RPC.NET into the ZIP file.
Comments
Adame
Is there a forum somewhere related to this, or could you answer questions by email
Thomas Freudenberg
Apparently you can ask questions here :)
Thypeexcach
Hello I am new here. I’m sorry if this
is the wrong place for this post. My name is Ren
I am from MExico
Anonymous
Ok, I admit defeat, you got me, I must be as blind as a bat……
Help…….
Try as I might I cannot get this working. I am using Blogengine.net as the hosting system for my blog, and have successfully published items to it using Windows Live Writer, but when I try to use your publisher, nothing, zip, nardar. And nothing is logged in CCNet. Any information you might be able to provide will be greatfully received.
Paul
Leave a Comment
Your email address will not be published. Required fields are marked *