AzureDevOpsAliases.

AzureDevOpsBuildUsingAzurePipelinesOAuthToken(ICakeContext) Method

Summary

Gets the description of the Azure Pipelines build which is running. Make sure the build has the 'Allow Scripts to access OAuth token' option enabled.
Assembly
Cake.AzureDevOps.dll
Namespace
Cake.AzureDevOps
Containing Type
AzureDevOpsAliases

Syntax

public static AzureDevOpsBuild AzureDevOpsBuildUsingAzurePipelinesOAuthToken(this ICakeContext context)

Examples

Get current Azure Pipelines build:

var build =
    AzureDevOpsBuildUsingAzurePipelinesOAuthToken();

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.

Return Value

Type Description
AzureDevOpsBuild Description of the build. Returns null if build could not be found and ThrowExceptionIfBuildCouldNotBeFound is set to false.