Azure Pipelines

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");
}

See IAzurePipelinesProvider for details and available methods to interact with Azure Pipelines.

Available 3rd party extensions

Cake.AzureDevOps by Pascal Berger
Addin for the Cake build automation system for working with Azure DevOps or Azure DevOps Server.
Cake.Issues.PullRequests.AzureDevOps by BBT Software AG and contributors
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.Tfs.AutoMerge by mabreu
Cake Aliases for auto merge Git Branches using TFS Pull Requests.
Cake.Tfs.Build.Variables by Attila Kemeny
Retrieving TFS variable from arguments or environment variables