Summary
Gets Azure Pipelines repository information.
- Namespace
- Cake
.Common .Build .AzurePipelines .Data - Containing Type
- Azure
Pipelines Environment Info
Syntax
public AzurePipelinesRepositoryInfo Repository { get; }
Examples
if (BuildSystem.AzurePipelines.IsRunningOnAzurePipelines)
{
Information(
@"Repository:
Branch: {0}
SourceVersion: {1}
Shelveset: {2}",
BuildSystem.AzurePipelines.Environment.Repository.Branch,
BuildSystem.AzurePipelines.Environment.Repository.SourceVersion,
BuildSystem.AzurePipelines.Environment.Repository.Shelveset
);
}
else
{
Information("Not running on Azure Pipelines");
}
if (AzurePipelines.IsRunningOnAzurePipelines)
{
Information(
@"Repository:
Branch: {0}
SourceVersion: {1}
Shelveset: {2}",
AzurePipelines.Environment.Repository.Branch,
AzurePipelines.Environment.Repository.SourceVersion,
AzurePipelines.Environment.Repository.Shelveset
);
}
else
{
Information("Not running on Azure Pipelines");
}
Value
Type | Description |
---|---|
Azure |
The Azure Pipelines repository information. |