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