<#-- TeamCity Defaut Feed Item Template Sample --> <#-- Uses FreeMarker template syntax, template guide can be found at http://freemarker.org/docs/dgui.html --> <#-- TO MAKE THE TEMPLATE EFFECTIVE, RENAME THE FILE TO feed-item-template.ftl --> <#-- The template is not used until renamed! --> <#-- The file feed-item-template.ftl.dist will be rewritten on server restart. --> <#if dataSetType == "FEED"> <#-- Feed Parameters --> <#if raw_feedType??><#global feedType="${raw_feedType[0]}"><#else> <#global feedType="atom_1.0"> <#assign build_text> <#if buildStatuses?seq_contains("SUCCESSFUL") && buildStatuses?seq_contains("FAILED")>Builds<#elseif buildStatuses?seq_contains("SUCCESSFUL")>Successful builds<#elseif buildStatuses?seq_contains("FAILED")>Failed builds <#-- Customized feed title --> <#global feedTitle> <#if raw_feedTitle??>${raw_feedTitle[0]}<#else> <#if itemsTypes?seq_contains("BUILDS") && itemsTypes?seq_contains("CHANGES")>${build_text} and changes<#elseif itemsTypes?seq_contains("CHANGES")>Changes<#elseif itemsTypes?seq_contains("BUILDS")>${build_text} of <#if buildTypes.size() == 1> ${buildTypes.iterator().next().fullName}<#else>${buildTypes.size()} build configurations. <#global feedDescription> <#if itemsTypes?seq_contains("BUILDS") && itemsTypes?seq_contains("CHANGES")>${build_text} and changes<#elseif itemsTypes?seq_contains("CHANGES")>Changes<#elseif itemsTypes?seq_contains("BUILDS")>${build_text} of ${buildTypes.toString()} build configuration(s) of TeamCity server at ${globalLinks.root}. (no more then ${itemsCount} items<#if sinceDate??>, only for items since ${sinceDate?date}) <#global feedAuthor="TeamCity server"> <#global feedLink><#if buildTypes.size() == 1><#-- TODO: refer to project if was specified --> <#assign buildTypeId=buildTypes.iterator().next().buildTypeId>${globalLinks.getConfigurationHomePage(buildTypeId)}<#else> ${globalLinks.root} <#if dataSetType == "FEED_ENTRY_BUILD"> <#-- Feed Build Item Template --> <#global entryTitle> Build ${project.fullName} / ${buildType.name} <#if build.branch??>[${build.branch.displayName}] #${build.buildNumber} <#if build.statusDescriptor.successful>was successful<#else>has failed <#global entryType="html"/> [!-- atom specification notes this should be "html" for HTML content --] <#-- Customized entry author --> <#if build.statusDescriptor.successful>${feedEntry.setAuthor("Successful Build")}<#else>${feedEntry.setAuthor("Failed Build")} <#global entryDescription> <#if build.branch??> Build branch: ${build.branch.displayName}
Status: ${build.statusDescriptor.text}
Finished on: ${build.finishDate?datetime}
Changes in the build: <#if build.containingChanges.size() == 0>none<#else> ${build.containingChanges.size()} by <#list uniqueCommitters as user> ${user}<#if user_has_next>,
Agent: ${build.agentName}
<#if build.shortStatistics.compilationErrorsCount != 0>Compilation errors: ${build.shortStatistics.compilationErrorsCount}
<#if (build.shortStatistics.passedTestCount != 0 ) || (build.shortStatistics.failedTestCount != 0)> <#assign delimiter=""> Tests: <#if build.shortStatistics.passedTestCount != 0 >${build.shortStatistics.passedTestCount} passed<#assign delimiter=", "> <#if build.shortStatistics.failedTestCount != 0 >${delimiter}${build.shortStatistics.failedTestCount} failed <#if build.shortStatistics.ignoredTestCount != 0 >${delimiter}${build.shortStatistics.ignoredTestCount} ignored
<#if build.shortStatistics.failedTestCount != 0> Failed tests: <#list build.shortStatistics.failedTests as failedTest> ${failedTest.test.name.shortName}<#if failedTest.newFailure> (new)<#if failedTest_has_next>, <#-- Extract that 20 --> <#if failedTest_index = 20> and ${build.shortStatistics.failedTests.size()-20} more<#break>
Build log <#if dataSetType == "FEED_ENTRY_CHANGE"> <#-- Feed Change Item Template --> <#global entryTitle> Change "<#if change.description != "">${change.description}<#else>No comment" by ${change.userName} (${change.changeCount} files) <#global entryType="html"/> [!-- atom specification notes this should be "html" for HTML content --] <#global entryDescription> Date: ${change.vcsDate?datetime}
Changed files:
<#list change.changes as file> ${file.relativeFileName} ${file.changeTypeName}