你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az pipelines build

Note

This reference is part of the azure-devops extension for the Azure CLI (version 2.30.0 or higher). 该扩展会在首次运行 az pipelines build 命令时自动安装。 Learn more about extensions.

Manage builds.

命令

名称 说明 类型 Status
az pipelines build cancel

如果生成正在运行,则取消。

Extension GA
az pipelines build definition

管理生成定义。

Extension GA
az pipelines build definition list

列出生成定义。

Extension GA
az pipelines build definition show

获取生成定义的详细信息。

Extension GA
az pipelines build list

列出生成结果。

Extension GA
az pipelines build queue

请求(队列)生成。

Extension GA
az pipelines build show

获取生成的详细信息。

Extension GA
az pipelines build tag

管理生成标记。

Extension GA
az pipelines build tag add

为生成添加标记(s)。

Extension GA
az pipelines build tag delete

删除生成标记。

Extension GA
az pipelines build tag list

获取生成标记。

Extension GA

az pipelines build cancel

如果生成正在运行,则取消。

az pipelines build cancel --build-id
                          [--detect {false, true}]
                          [--open]
                          [--org --organization]
                          [--project]

必需参数

--build-id

生成的 ID。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--detect

自动检测组织。

属性
接受的值: false, true
--open

在 Web 浏览器中打开生成结果页。

属性
默认值: False
--org --organization

Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/

--project -p

项目的名称或 ID。 可以使用 az devops configure -d project=NAME_OR_ID 配置默认项目。 如果未配置为默认或通过 git 配置进行选取,则为必需。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az pipelines build list

列出生成结果。

az pipelines build list [--branch]
                        [--definition-ids]
                        [--detect {false, true}]
                        [--org --organization]
                        [--project]
                        [--reason {all, batchedCI, buildCompletion, checkInShelveset, individualCI, manual, pullRequest, schedule, triggered, userCreated, validateShelveset}]
                        [--requested-for]
                        [--result {canceled, failed, none, partiallySucceeded, succeeded}]
                        [--status {all, cancelling, completed, inProgress, none, notStarted, postponed}]
                        [--tags]
                        [--top]

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--branch

按此分支的生成进行筛选。

--definition-ids

要列出其内部版本的定义的 ID(空格分隔)。

--detect

自动检测组织。

属性
接受的值: false, true
--org --organization

Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/

--project -p

项目的名称或 ID。 可以使用 az devops configure -d project=NAME_OR_ID 配置默认项目。 如果未配置为默认或通过 git 配置进行选取,则为必需。

--reason

限制为生成,原因如下。

属性
接受的值: all, batchedCI, buildCompletion, checkInShelveset, individualCI, manual, pullRequest, schedule, triggered, userCreated, validateShelveset
--requested-for

限制为此用户或组请求的生成。

--result

此结果的生成限制。

属性
接受的值: canceled, failed, none, partiallySucceeded, succeeded
--status

限制为具有此状态的生成。

属性
接受的值: all, cancelling, completed, inProgress, none, notStarted, postponed
--tags

使用每个指定标记进行生成的限制。 Space separated.

--top

要列出的最大生成数。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az pipelines build queue

请求(队列)生成。

az pipelines build queue [--branch]
                         [--commit-id]
                         [--definition-id]
                         [--definition-name]
                         [--detect {false, true}]
                         [--open]
                         [--org --organization]
                         [--project]
                         [--queue-id]
                         [--variables]

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--branch

要生成的分支。 如果未在定义上设置默认分支,则为必需。 示例:refs/heads/master 或 master 或 refs/pull/1/merge 或 refs/tags/tag。

--commit-id

要生成的分支的提交 ID。

--definition-id

要排队的定义的 ID。 如果未提供 --name,则为必需。

--definition-name

要排队的定义的名称。 如果提供了 --id,则忽略。

--detect

自动检测组织。

属性
接受的值: false, true
--open

在 Web 浏览器中打开生成结果页。

属性
默认值: False
--org --organization

Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/

--project -p

项目的名称或 ID。 可以使用 az devops configure -d project=NAME_OR_ID 配置默认项目。 如果未配置为默认或通过 git 配置进行选取,则为必需。

--queue-id

将用于对生成进行排队的池的队列 ID。

--variables

要设置的变量的空格分隔“name=value”对。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az pipelines build show

获取生成的详细信息。

az pipelines build show --id
                        [--detect {false, true}]
                        [--open]
                        [--org --organization]
                        [--project]

必需参数

--id

生成的 ID。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--detect

自动检测组织。

属性
接受的值: false, true
--open

在 Web 浏览器中打开生成结果页。

属性
默认值: False
--org --organization

Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/

--project -p

项目的名称或 ID。 可以使用 az devops configure -d project=NAME_OR_ID 配置默认项目。 如果未配置为默认或通过 git 配置进行选取,则为必需。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False