AzurePipelinesEnvironmentInfo.

Build Property

Summary

Gets Azure Pipelines Build information.

Syntax

public AzurePipelinesBuildInfo Build { get; }

Examples

if (BuildSystem.AzurePipelines.IsRunningOnAzurePipelines)
{
    Information(
        @"Build:
        Id: {0}
        Number: {1}
        QueuedBy: {2}",
        BuildSystem.AzurePipelines.Environment.Build.Id,
        BuildSystem.AzurePipelines.Environment.Build.Number,
        BuildSystem.AzurePipelines.Environment.Build.QueuedBy
        );
}
else
{
    Information("Not running on Azure Pipelines");
}
if (AzurePipelines.IsRunningOnAzurePipelines)
{
    Information(
        @"Build:
        Id: {0}
        Number: {1}
        QueuedBy: {2}",
        AzurePipelines.Environment.Build.Id,
        AzurePipelines.Environment.Build.Number,
        AzurePipelines.Environment.Build.QueuedBy
        );
}
else
{
    Information("Not running on Azure Pipelines");
}

Value

Type Description
AzurePipelinesBuildInfo The Azure Pipelines Build.