TeamCityEnvironmentInfo.

Build Property

Summary

Gets TeamCity build information.

Syntax

public TeamCityBuildInfo Build { get; }

Examples

if (BuildSystem.TeamCity.IsRunningOnTeamCity)
{
    Information(
        @"Build:
        BuildConfName: {0}
        Number: {1}",
        BuildSystem.TeamCity.Environment.Build.BuildConfName,
        BuildSystem.TeamCity.Environment.Build.Number
        );
}
else
{
    Information("Not running on TeamCity");
}
if (TeamCity.IsRunningOnTeamCity)
{
    Information(
        @"Build:
        BuildConfName: {0}
        Number: {1}",
        TeamCity.Environment.Build.BuildConfName,
        TeamCity.Environment.Build.Number
        );
}
else
{
    Information("Not running on TeamCity");
}

Value

Type Description
TeamCityBuildInfo The TeamCity build information.