GoCDEnvironmentInfo.

Repository Property

Summary

Gets GoCD repository information.

Syntax

public GoCDRepositoryInfo Repository { get; }

Examples

if (BuildSystem.GoCD.IsRunningOnGoCD)
{
    Information(
        @"Repository:
        Revision: {0}
        ToRevision: {1}
        FromRevision: {2}",
        BuildSystem.GoCD.Environment.Repository.Revision,
        BuildSystem.GoCD.Environment.Repository.ToRevision,
        BuildSystem.GoCD.Environment.Repository.FromRevision
        );
}
else
{
    Information("Not running on GoCD");
}
if (GoCD.IsRunningOnGoCD)
{
    Information(
        @"Repository:
        Revision: {0}
        ToRevision: {1}
        FromRevision: {2}",
        GoCD.Environment.Repository.Revision,
        GoCD.Environment.Repository.ToRevision,
        GoCD.Environment.Repository.FromRevision
        );
}
else
{
    Information("Not running on GoCD");
}

Value

Type Description
GoCDRepositoryInfo The GoCD repository information.