Summary
Gets the TeamCity environment.
- Namespace
- Cake
.Common .Build .TeamCity - Containing Type
- ITeamCityProvider
Syntax
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");
}
if (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 |
---|---|
Team |
The TeamCity environment. |