TeamCityProvider.

Environment Property

Summary

Gets the TeamCity environment.
Namespace
Cake.Common.Build.TeamCity
Containing Type
TeamCityProvider

Syntax

public TeamCityEnvironmentInfo Environment { get; }

Examples

if (BuildSystem.TeamCity.IsRunningOnTeamCity)
{
    Information(
        @"Environment:
        PullRequest: {0}
        Build Configuration Name: {1}
        TeamCity Project Name: {2}",
        BuildSystem.TeamCity.Environment.PullRequest.IsPullRequest,
        BuildSystem.TeamCity.Environment.Build.BuildConfName,
        BuildSystem.TeamCity.Environment.Project.Name
        );
}
else
{
    Information("Not running on TeamCity");
}

Value

Type Description
TeamCityEnvironmentInfo The TeamCity environment.