The RssBuilds Publisher generates a very customizable RSS Feed from the build process. Any value can be set dynamically by using the Macro Engine.

  <rssBuilds encoding="utf-8" fileName="$(ProjectName)Nightly" 
           buildCondition="IfModificationExists"
           addEnclosure="true">
  <pingItems>
    <pingItem pingUrl="http://ping-service.com/ping" feedUrl="http://mydomain.com/feed.xml" feedName="$(ProjectName)" />
    <pingItem pingUrl="http://ping.somedomain.com/ping" feedUrl="http://mydomain.com/feed.xml" feedName="$(ProjectName)" />
  </pingItems>
  <rssExtensions>
    <namespace prefix="slash" namespaceURI="http://purl.org/rss/1.0/modules/slash/" />
  </rssExtensions>
  <feedImage url="http://mydomain.com/images/logo.png" title="$(ProjectName)" link="$(ProjectUrl)" />
  <maxHistory>25</maxHistory>
  <channelUrl>$(ProjectUrl)</channelUrl>
  <itemUrl>http://mydomain.com/builds/$(Label)/$(ProjectName).$(Label).zip</itemUrl>
  <enclosureUrl>$(ItemUrl)</enclosureUrl>
  <feedTitle>Nightly Builds for $(ProjectName)</feedTitle>
  <feedDescription>Build Report for $(ProjectName)</feedDescription>
  <itemTitle>$(ProjectName) $(Label)</itemTitle>
  <feedElements>
    <rssElement name="webmaster" value="my.email@address.com" />
  </feedElements>
  <itemElements>
    <rssElement prefix="dc" name="creator" value="Ryan" />
  </itemElements>
  <categories>
    <category name="NightlyBuilds" />
    <category name="CC.NET" />
    <category name="Publisher" />
    <category name="$(ProjectName)" />
    <category name="$(ProjectName) $(Label)" />
  </categories>
  <descriptionHeader><![CDATA[<p>]]></descriptionHeader>
  <descriptionFooter><![CDATA[</p>
  <p><a href="http://mydomain.com/builds/$(Label)/$(ProjectName).$(Label).zip">$(ProjectName) $(Label) Binaries</a><br />
  <a href="http://mydomain.com/builds/$(Label)/$(ProjectName).$(Label).src.zip">$(ProjectName) $(Label) Source</a><br />
  <a href="http://mydomain.com/builds/$(Label)/$(ProjectName).$(Label).msi.zip">$(ProjectName) $(Label) Installer</a><br />
  </p>]]></descriptionFooter>
</rssBuilds>

Root Elements

Name Description Required Type Default
encoding The encoding to use for the file false string utf-8
fileName The name of the file, minus the xml extension, that the rss feed will be save or modified if already exists. false string rss
buildCondition The build condition in which the feed item should be created false BuildCondition AllBuildConditions
addEnclosure If an enclosure element should be added to the feed item false boolean false
pingItems A collection of services to ping after publishing the feed item false PingItem
rssExtensions A collection of namespaces to add to the feed false Namespace Collection
feedImage The feed image information false FeedImage
maxHistory The maximum number of feed items to keep in the feed. Older items will be moved to $(fileName).history.xml false integer 25
channelUrl The url to use for the channel true string
itemUrl The url to use for each item created. This can be generated dynamically using the Macro Engine true string
enclosureUrl The url to a file to add as an enclosure false string
feedTitle The title of the feed true string
feedDescription The feed description true string
itemTitle The title of each item true string
feedElements A collection of other elements to add to the feed category element false RssElement collection
itemElements A collection of elements to add to the item element false RssElement collection
categories A collection of categories that will be added to the feed item false Category collection
descriptionHeader A string that will be added to the beginning of every feed item when it is created. false string
descriptionFooter A string that will be added to the end of every feed item when it is created. false string


Feed Image

Name Description Required Type Default
url The url to the image to display true string
title The title attribute or the image true string
link The url that clicking on the image will direct the user to true string


Rss Element

Name Description Required Type Default
prefix The xml namespace prefix for the element. A corresponding namespace should be added to the rssExtensions element if defined. false string
name The element name true string
value The value of the element if a simple element. Should be left blank if the rss element will have child rss elements. false string
isCData Indicates if the value should be contained in a CDATA false boolean false
attributes a collection of attribute elements that define an attribute for the element false AttributeElement collection
childElements a collection of rss elements that are added as child elements to the defining element false RssElement collection


Rss Element Attribute

Name Description Required Type Default
prefix The xml namespace prefix for the attribute. A corresponding namespace should be added to the rssExtensions element if defined. false string
name The attributename true string
value The value of the attributeif a simple element. false string


        <rssElement isCData="false"  name="creator" prefix="dc" value="Ryan" />
        <rssElement prefix="foo" name="Info">
          <attributes>
            <attribute name="UpdatedDate" value="@{DateTimeToString(yyyy-MM-ddTHH:mm:ss.fffffzzz)}" />
            </attribute>
            <attribute name="Version" value="$(Label)" />
          </attributes>
          <childElements>
            <rssElement name="Comments" prefix="foo" isCData="false" value="$(ModificationComments)" />
          </childElements>
        </rssElement>

The above example would create output something like the following:

  <dc:creator>Ryan</dc:creator>
  <foo:Info UpdateDate="2008-05-06T12:45:33.0432-06" Version="1.0.506.12458">
    <foo:Comments>
      Some comment here
    </foo>
  </foo:Info>

Ping Item

Name Description Required Type Default
pingUrl The url of the service to ping true string
feedUrl The url of the feed true string
feedName The name of the feed true string

Last edited Jul 26, 2008 at 4:39 AM by camalot, version 8

Comments

No comments yet.