AzureDevOpsAliases.

AzureDevOpsBuildWorkItems(ICakeContext, AzureDevOpsBuildSettings) Method

Summary

Gets the work items associated with an Azure Pipelines build.
Assembly
Cake.AzureDevOps.dll
Namespace
Cake.AzureDevOps
Containing Type
AzureDevOpsAliases

Syntax

public static IEnumerable<AzureDevOpsWorkItem> AzureDevOpsBuildWorkItems(this ICakeContext context, AzureDevOpsBuildSettings settings)

Examples

Get work items associated with an Azure Pipelines build:

 var buildSettings =
     new AzureDevOpsBuildSettings(
         new Uri("http://myserver:8080/defaultcollection"),
         "MyProject",
         42,
         AzureDevOpsAuthenticationNtlm());

 var workItems =
     AzureDevOpsBuildWorkItems(
         buildSettings);

 Information("Work item:");
 foreach (var workItem in workItems)
 {
     Information("  {0}: {1}", workItem.Id, workItem.Title);
 }

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings AzureDevOpsBuildSettings Settings for getting the build.

Return Value

Type Description
IEnumerable<AzureDevOpsWorkItem> The work items associated with the build. Returns an empty list if build could not be found and ThrowExceptionIfBuildCouldNotBeFound is set to false.