GoCDEnvironmentInfo.

JobName Property

Summary

Gets the name of the current job being run.

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.