Summary
Gets the name of the current job being run.
- Namespace
- Cake
.Common .Build .GoCD .Data - Containing Type
- GoCDEnvironmentInfo
Syntax
public string JobName { get; }
Examples
if (BuildSystem.GoCD.IsRunningOnGoCD)
{
Information(
@"JobName: {0}",
BuildSystem.GoCD.Environment.JobName
);
}
else
{
Information("Not running on GoCD");
}
if (GoCD.IsRunningOnGoCD)
{
Information(
@"JobName: {0}",
GoCD.Environment.JobName
);
}
else
{
Information("Not running on GoCD");
}
Value
Type | Description |
---|---|
string | The job name. |