az pipelines build

Note

This reference is part of the azure-devops extension for the Azure CLI (version 2.30.0 or higher). The extension will automatically install the first time you run an az pipelines build command. Learn more about extensions.

Manage builds.

Commands

Name Description Type Status
az pipelines build cancel

Cancels if build is running.

Extension GA
az pipelines build definition

Manage build definitions.

Extension GA
az pipelines build definition list

List build definitions.

Extension GA
az pipelines build definition show

Get the details of a build definition.

Extension GA
az pipelines build list

List build results.

Extension GA
az pipelines build queue

Request (queue) a build.

Extension GA
az pipelines build show

Get the details of a build.

Extension GA
az pipelines build tag

Manage build tags.

Extension GA
az pipelines build tag add

Add tag(s) for a build.

Extension GA
az pipelines build tag delete

Delete a build tag.

Extension GA
az pipelines build tag list

Get tags for a build.

Extension GA

az pipelines build cancel

Cancels if build is running.

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

Required Parameters

--build-id

ID of the build.

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--open

Open the build results page in your web browser.

default value: False
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az pipelines build list

List build results.

az pipelines build list [--branch]
                        [--definition-ids]
                        [--detect {false, true}]
                        [--org]
                        [--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]

Optional Parameters

--branch

Filter by builds for this branch.

--definition-ids

IDs (space separated) of definitions to list builds for.

--detect

Automatically detect organization.

accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--reason

Limit to builds with this reason.

accepted values: all, batchedCI, buildCompletion, checkInShelveset, individualCI, manual, pullRequest, schedule, triggered, userCreated, validateShelveset
--requested-for

Limit to builds requested for this user or group.

--result

Limit to builds with this result.

accepted values: canceled, failed, none, partiallySucceeded, succeeded
--status

Limit to builds with this status.

accepted values: all, cancelling, completed, inProgress, none, notStarted, postponed
--tags

Limit to builds with each of the specified tags. Space separated.

--top

Maximum number of builds to list.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az pipelines build queue

Request (queue) a build.

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

Optional Parameters

--branch

Branch to build. Required if there is not a default branch set up on the definition. Example: refs/heads/master or master or refs/pull/1/merge or refs/tags/tag.

--commit-id

Commit ID of the branch to build.

--definition-id

ID of the definition to queue. Required if --name is not supplied.

--definition-name

Name of the definition to queue. Ignored if --id is supplied.

--detect

Automatically detect organization.

accepted values: false, true
--open

Open the build results page in your web browser.

default value: False
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--queue-id

Queue Id of the pool that will be used to queue the build.

--variables

Space separated "name=value" pairs for the variables you would like to set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az pipelines build show

Get the details of a build.

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

Required Parameters

--id

ID of the build.

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--open

Open the build results page in your web browser.

default value: False
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.