JenkinsEnvironmentInfo.

Build Property

Summary

Gets Jenkins build information.

Syntax

public JenkinsBuildInfo Build { get; }

Examples

if (BuildSystem.Jenkins.IsRunningOnJenkins)
{
    Information(
        @"Build:
        BuildNumber: {0}
        BuildId: {1}
        BuildDisplayName: {2}",
        BuildSystem.Jenkins.Environment.Build.BuildNumber,
        BuildSystem.Jenkins.Environment.Build.BuildId,
        BuildSystem.Jenkins.Environment.Build.BuildDisplayName
        );
}
else
{
    Information("Not running on Jenkins");
}
if (Jenkins.IsRunningOnJenkins)
{
    Information(
        @"Build:
        BuildNumber: {0}
        BuildId: {1}
        BuildDisplayName: {2}",
        Jenkins.Environment.Build.BuildNumber,
        Jenkins.Environment.Build.BuildId,
        Jenkins.Environment.Build.BuildDisplayName
        );
}
else
{
    Information("Not running on Jenkins");
}

Value

Type Description
JenkinsBuildInfo The build.