Out of the box support
The AzurePipelines alias, which returns an
IAzurePipelinesProvider instance can be used to interact with the Azure Pipelines environment.
The following example writes an error message if running on Azure Pipelines:
if (BuildSystem.AzurePipelines.IsRunningOnAzurePipelines)
{
BuildSystem.AzurePipelines.Commands.WriteError(
"This is a error message.");
}
else
{
Information("Not running on Azure Pipelines");
}
Available 3rd party extensions
Addin for the Cake build automation system for working with Azure DevOps or Azure DevOps Server.
The Azure DevOps support for the Cake.Issues addin allows you to
write found issues as comments to Azure DevOps pull requests.
This addin provides the aliases for writing to Azure DevOps pull requests.
It also requires the core Cake.Issues and Cake.Issues.PullRequests addins and one or more issue providers.
See cakeissues.net for an overview of the whole ecosystem of addins for working with issues in Cake scripts.
Cake Aliases for auto merge Git Branches using TFS Pull Requests.
Retrieving TFS variable from arguments or environment variables