Thomas Freudenberg

Confessions of a caffeine addict

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 Wink

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><a href="http://localhost/MetaWeblog" class="linkification-ext" title="Linkification: http://localhost/MetaWeblog">http://localhost/MetaWeblog</a> 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 sould be used. Additionally you can specify categories for the post:

<publishers>
    ...
    <blog>
        <url><a href="http://localhost/MetaWeblog" class="linkification-ext" title="Linkification: http://localhost/MetaWeblog">http://localhost/MetaWeblog</a> 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

Thomas Freudenberg said:

Some weeks ago I posted a CC.NET task which pushes build results to a blog using the MetaWeblogAPI. This

# June 17, 2007 2:43 PM

Paul Riley said:

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

# April 16, 2008 8:37 AM

Adame said:

Is there a forum somewhere related to this, or could you answer questions by email

# August 5, 2010 11:05 AM

Thomas Freudenberg said:

Apparently you can ask questions here :)

# August 6, 2010 2:51 AM

Thypeexcach said:

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

# August 18, 2010 3:04 AM