az pipelines build

注意

此參考是 Azure CLI 的 azure-devops 延伸模組的一部分 (2.30.0 版或更高版本)。 擴充功能會在您第一次執行 az pipelines build 命令時自動安裝。 深入了解擴充功能。

管理組建。

命令

名稱 Description 類型 狀態
az pipelines build cancel

如果組建正在執行,則取消。

擴充 GA
az pipelines build definition

管理組建定義。

擴充 GA
az pipelines build definition list

列出組建定義。

擴充 GA
az pipelines build definition show

取得組建定義的詳細資料。

擴充 GA
az pipelines build list

列出組建結果。

擴充 GA
az pipelines build queue

要求 (佇列) 組建。

擴充 GA
az pipelines build show

取得組建的詳細資料。

擴充 GA
az pipelines build tag

管理組建標籤。

擴充 GA
az pipelines build tag add

新增組建的標籤。。

擴充 GA
az pipelines build tag delete

刪除組建標籤。

擴充 GA
az pipelines build tag list

取得組建的標籤。

擴充 GA

az pipelines build cancel

如果組建正在執行,則取消。

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

必要參數

--build-id

組建的識別碼。

選擇性參數

--detect

自動偵測組織。

接受的值: false, true
--open

在網頁瀏覽器中開啟組建結果頁面。

預設值: False
--org --organization

Azure DevOps 組織 URL。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。範例: https://dev.azure.com/MyOrganizationName/

--project -p

專案的名稱或識別碼。 您可以使用 az devops configure -d project=NAME_OR_ID 來設定預設專案。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az pipelines build list

列出組建結果。

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]

選擇性參數

--branch

依此分支的組建進行篩選。

--definition-ids

要列出組建的定義識別碼(空格分隔)。

--detect

自動偵測組織。

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

Azure DevOps 組織 URL。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。範例: https://dev.azure.com/MyOrganizationName/

--project -p

專案的名稱或識別碼。 您可以使用 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

使用每個指定的標記來建置的限制。 以空格分隔。

--top

要列出的最大組建數目。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az pipelines build queue

要求 (佇列) 組建。

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

選擇性參數

--branch

要建置的分支。 如果未在定義上設定預設分支,則為必要。 範例:refs/heads/master 或 master 或 refs/pull/1/merge 或 refs/tags/tag。

--commit-id

要建置之分支的認可識別碼。

--definition-id

要排入佇列的定義識別碼。 如果未提供 --name,則為必要專案。

--definition-name

要排入佇列的定義名稱。 如果提供 --id,則會忽略 。

--detect

自動偵測組織。

接受的值: false, true
--open

在網頁瀏覽器中開啟組建結果頁面。

預設值: False
--org --organization

Azure DevOps 組織 URL。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。範例: https://dev.azure.com/MyOrganizationName/

--project -p

專案的名稱或識別碼。 您可以使用 az devops configure -d project=NAME_OR_ID 來設定預設專案。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。

--queue-id

將用來將組建排入佇列的集區佇列識別碼。

--variables

您想要設定之變數的空間分隔 「name=value」 組。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az pipelines build show

取得組建的詳細資料。

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

必要參數

--id

組建的識別碼。

選擇性參數

--detect

自動偵測組織。

接受的值: false, true
--open

在網頁瀏覽器中開啟組建結果頁面。

預設值: False
--org --organization

Azure DevOps 組織 URL。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。範例: https://dev.azure.com/MyOrganizationName/

--project -p

專案的名稱或識別碼。 您可以使用 az devops configure -d project=NAME_OR_ID 來設定預設專案。 如果未設定為預設,或透過 git 組態挑選,則為必要專案。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。