Summary
Gets Azure Pipelines Build Definition information.
- Namespace
- Cake
.Common .Build .AzurePipelines .Data - Containing Type
- Azure
Pipelines Environment Info
Syntax
public AzurePipelinesDefinitionInfo BuildDefinition { get; }
Examples
if (BuildSystem.AzurePipelines.IsRunningOnAzurePipelines)
{
Information(
@"BuildDefinition:
Id: {0}
Name: {1}
Version: {2}",
BuildSystem.AzurePipelines.Environment.BuildDefinition.Id,
BuildSystem.AzurePipelines.Environment.BuildDefinition.Name,
BuildSystem.AzurePipelines.Environment.BuildDefinition.Version
);
}
else
{
Information("Not running on AzurePipelines");
}
if (AzurePipelines.IsRunningOnAzurePipelines)
{
Information(
@"BuildDefinition:
Id: {0}
Name: {1}
Version: {2}",
AzurePipelines.Environment.BuildDefinition.Id,
AzurePipelines.Environment.BuildDefinition.Name,
AzurePipelines.Environment.BuildDefinition.Version
);
}
else
{
Information("Not running on AzurePipelines");
}
Value
Type | Description |
---|---|
Azure |
The Azure Pipelines Build Definition. |