-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
Platform: All, OS: All
The build feeds available at /hudson/job/project/rssAll actually provide Atom
feeds. It would be helpful if the feed flavor could be selected with a
parameter, e.g. /hudson/job/project/rssAll?flavor=rss20 would provide an RSS 2.0
feed to accomodate tools that are not able to parse Atom.
Here is an example jelly template for RSS 2.0 feeds:
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
<st:contentType value="text/xml;charset=UTF-8" />
<j:set var="rootURL"
value="${request.scheme}://${request.serverName}:${request.serverPort}${request.contextPath}"
/>
<rss version="2.0">
<channel>
<title>${title}</title>
<link>${rootURL}/${it.url}</link>
<description>${title}</description>
<j:forEach var="build" items="${runs}" >
<item>
<title>${build.parent.name} #${build.number} (${build.result})</title>
<link>${rootURL}/${build.url}</link>
<guid isPermaLink="false">tag:${build.parent.name}:${build.id}</guid>
<pubDate>${build.timestampString2}</pubDate>
<author>Hudson</author>
</item>
</j:forEach>
</channel>
</rss>
</j:jelly>