Summary
Gets Azure Pipelines Build information.
- Namespace
- Cake
.Common .Build .AzurePipelines .Data - Containing Type
- Azure
Pipelines Environment Info
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 |
---|---|
Azure |
The Azure Pipelines Build. |