Summary
Gets the environment name. This is only set if the environment is specified. Otherwise the variable is not set.
- Namespace
- Cake
.Common .Build .GoCD .Data - Containing Type
- GoCDEnvironmentInfo
Syntax
public string EnvironmentName { get; }
Examples
if (BuildSystem.GoCD.IsRunningOnGoCD)
{
Information(
@"EnvironmentName: {0}",
BuildSystem.GoCD.Environment.EnvironmentName
);
}
else
{
Information("Not running on GoCD");
}
if (GoCD.IsRunningOnGoCD)
{
Information(
@"EnvironmentName: {0}",
GoCD.Environment.EnvironmentName
);
}
else
{
Information("Not running on GoCD");
}
Value
Type | Description |
---|---|
string | The environment name. |