TeamCity 4.0 Help

MSBuild Service Tasks

For MSBuild, TeamCity provides the following service tasks that implement the same options as the Build Script Interaction with TeamCity:

TeamCitySetBuildNumber

TeamCitySetBuildNumber allows user to change BuildNumber:

<TeamCitySetBuildNumber BuildNumber="1.3_{build.number}" />

It is possible to use '{build.number}' as a placeholder for older build number.

TeamCityProgressMessage

TeamCityProgressMessage allows you to write progress message.

<TeamCityProgressMessage Text="Progress message text" />

TeamCityPublishArtifacts

TeamCityPublishArtifacts allows you to publish all artifacts taken from MSBuild item group

<ItemGroup> <Files Include="*.dll" /> </ItemGroup> <TeamCityPublishArtifacts SourceFiles="@(Files-> '%(FullPath)' )" Condition=" '$(TEAMCITY_VERSION)' != '' "/>

TeamCityReportStatsValue

TeamCityReportStatsValue is a handy task to publish statistic values

<TeamCityReportStatsValue Key="StatsValueType" Value="42" />

TeamCitySetStatus

TeamCitySetStatus is a task to change current status text and/or message

<TeamCitySetStatus Status="ERROR" Text="ZZZ" />

*'{build.status.text}' is substituted with older status text. Status could have one of the following values: NOT_CHANGED, FAILURE, SUCCESS, NORMAL, ERROR

Last modified: 20 April 2023