az devops migrations

備註

此參考文獻是該Azure CLIazure-devops擴充套件(版本 2.30.0 或更高版本)的一部分。 這個擴充功能會在你第一次執行 az devops 遷移 指令時自動安裝。 深入了解擴充功能。

此命令群組處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

管理企業即時遷移。

ELM 遷移指令群組是 azure-devops 擴充套件的一部分。 如需詳細資訊,請參閱 https://aka.ms/adoELM。

命令

名稱 Description 類型 狀態
az devops migrations abandon

放棄遷徙。

Extension Preview
az devops migrations create

建立一個儲存庫的遷移。

Extension Preview
az devops migrations cutover

管理遷移切換。

Extension Preview
az devops migrations cutover approve

透過接受未處理的項目和/或驗證重新接線的管線來批准切換。

Extension Preview
az devops migrations cutover cancel

取消預定的切換。

Extension Preview
az devops migrations cutover review

在切換前檢視未處理的遷移項目。

Extension Preview
az devops migrations cutover set

安排遷移的切換時間。

Extension Preview
az devops migrations list

列出組織內的遷移。

Extension Preview
az devops migrations pause

暫停正在進行的遷移。

Extension Preview
az devops migrations pipelines

管理遷移時的管線重配。 (預覽)。

Extension Preview
az devops migrations pipelines delete

刪除管線重新接線的資料以進行遷移。 (預覽)。

Extension Preview
az devops migrations pipelines list

列出管線重新接線的配置及各管線狀態。

Extension Preview
az devops migrations pipelines retry

重試,管線重新布線失敗。 (預覽)。

Extension Preview
az devops migrations pipelines submit

提交管線重新接線。 (預覽)。

Extension Preview
az devops migrations pipelines update

批量更新管線重新配線設定。 (預覽)。

Extension Preview
az devops migrations resume

繼續一個停止(暫停、失敗)的遷移。

Extension Preview
az devops migrations status

取得儲存庫的遷移狀態。

Extension Preview

az devops migrations abandon

預覽

指揮組的「DevOps 遷移」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

放棄遷徙。

將遷移遷移移動到一個廢棄/失敗狀態;遷移紀錄並未被清除。 管線重新接線的資料會保留原狀,以便後續遷移時能重複使用。

az devops migrations abandon [--acquire-policy-token]
                             [--change-reference]
                             [--detect {false, true}]
                             [--org --organization]
                             [--remove-read-only]
                             [--repository-id]
                             [--yes]

範例

放棄並保留倉庫唯讀(預設)。

az devops migrations abandon --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000

放棄並將儲存庫設回讀寫模式。

az devops migrations abandon --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --remove-read-only

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性 值
參數群組: Global Policy Arguments
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性 值
參數群組: Global Policy Arguments
--detect

自動偵測企業組織。

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

Azure DevOps 組織網址。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設值,或未透過 git config 抓取,則為必要項目。範例:https://dev.azure.com/MyOrganizationName/。

--remove-read-only

另外,透過發送 removeReadOnly=true 將 Azure Repos 儲存庫設回讀寫狀態。

屬性 值
預設值: False
--repository-id

Azure Repos 倉庫 (GUID) 的 ID。

--yes -y

不提示確認。

屬性 值
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性 值
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性 值
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性 值
預設值: False

az devops migrations create

預覽

指揮組的「DevOps 遷移」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立一個儲存庫的遷移。

GitHub 認證使用裝置流程:CLI 會印出 URL 和一次性代碼,以互動式完成登入。 不需要 GitHub 代幣或服務連線。

az devops migrations create [--acquire-policy-token]
                            [--agent-pool]
                            [--auto-discover --enable-auto-discover-pipelines]
                            [--change-reference]
                            [--cutover-date]
                            [--detect {false, true}]
                            [--enable-boards-gh --enable-boards-github-connection]
                            [--org --organization]
                            [--pipeline-sc-id --pipeline-service-connection-id]
                            [--repository-id]
                            [--skip-validation]
                            [--target-owner-user-id]
                            [--target-repository]
                            [--validate-only]

範例

建立遷移。

az devops migrations create --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --target-repository https://github.com/OrgName/RepoName --agent-pool <your-agent-pool>

建立僅驗證的遷移。

az devops migrations create --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --target-repository https://github.com/OrgName/RepoName --agent-pool <your-agent-pool> --validate-only --skip-validation ActivePullRequestCount,PullRequestDeltaSize

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性 值
參數群組: Global Policy Arguments
--agent-pool

用於遷移工作的代理池名稱。

--auto-discover --enable-auto-discover-pipelines

切換時請選擇自動啟用管線發現。 默認為關閉。 啟用後,ELM 同步工作會走訪原始碼儲存庫,並為每個參考該管線建立克隆定義。 需要 --pipeline-service-connection-id;沒有 IT 的話,發現程序會以 no-op 形式運行,且不會註冊任何管線。 管線重配本身始終可以透過 az devops 遷移管線提交/更新來取得。

屬性 值
預設值: False
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性 值
參數群組: Global Policy Arguments
--cutover-date

預定切換日期/時間(ISO 8601)。

--detect

自動偵測企業組織。

屬性 值
接受的值: false, true
--enable-boards-gh --enable-boards-github-connection

切換時選擇配置Azure Boards GitHub連線。 默認為關閉。 要求在遷移執行前,必須先在目標GitHub企業組織安裝 Azure Boards GitHub 應用程式。

屬性 值
預設值: False
--org --organization

Azure DevOps 組織網址。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設值,或未透過 git config 抓取,則為必要項目。範例:https://dev.azure.com/MyOrganizationName/。

--pipeline-sc-id --pipeline-service-connection-id

在建立時附加的 Project 範圍 GitHub 服務連線 ID(GUID),用於管線重新配線。 與 --enable-auto-discover-pipelines 結合時,必須具備完全自動發現;手動模式下可選(預先連接,後續管線只需 --pipeline-ids 提交呼叫)。

--repository-id

Azure Repos 倉庫 (GUID) 的 ID。

--skip-validation

驗證政策可跳過。 接受以逗號分隔的政策名稱清單(例如 AgentPoolExists、MaxFileSize)或非負整數位元遮罩。 支援的政策名稱(大小寫不區分):無、ActivePullRequestCount、PullRequestDeltaSize、AgentPoolExists、MaxFileSize、MaxPullRequestSize、MaxPushPackSize、MaxReferenceNameLength、TargetRepositoryDoesNotExist、SourceRepositoryContainsLfsObjects、SourceRepositoryNotReadOnly、BoardsGitHubConnectionProvisioning、全部。

--target-owner-user-id

目標儲存庫擁有者使用者 ID。 啟用伺服器端基於代幣的擁有者解析後,已棄用並忽略。

--target-repository

目標儲存庫網址(必須以 http:// 或 https://開頭)。

--validate-only

請以僅驗證模式建立(僅進行遷移前檢查)。

屬性 值
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性 值
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性 值
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性 值
預設值: False

az devops migrations list

預覽

指揮組的「DevOps 遷移」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出組織內的遷移。

預設情況下,無論狀態如何,都會回傳每個儲存庫的最新遷移結果。 使用 --include-all 以回傳完整的遷移歷史。

az devops migrations list [--detect {false, true}]
                          [--include-all]
                          [--include-inactive]
                          [--org --organization]
                          [--project]

範例

列出每個儲存庫的最新遷移情況。

az devops migrations list --org https://dev.azure.com/myorg

列出每個儲存庫的完整遷移歷史。

az devops migrations list --org https://dev.azure.com/myorg --include-all

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--detect

自動偵測企業組織。

屬性 值
接受的值: false, true
--include-all

回傳完整的遷移歷史(每個儲存庫的所有紀錄)。 預設情況下,每個儲存庫只會回傳最新的遷移資料,不論其狀態為何。

屬性 值
預設值: False
--include-inactive
已被取代

選項「--include-inactive」已被棄用,未來版本將移除。 改用「--include-all」。

Deprecated. 改用 --include-all。

屬性 值
預設值: False
--org --organization

Azure DevOps 組織網址。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設值,或未透過 git config 抓取,則為必要項目。範例:https://dev.azure.com/MyOrganizationName/。

--project

可選地設定專案名稱或 ID 來篩選遷移。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性 值
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性 值
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性 值
預設值: False

az devops migrations pause

預覽

指揮組的「DevOps 遷移」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

暫停正在進行的遷移。

az devops migrations pause [--acquire-policy-token]
                           [--change-reference]
                           [--detect {false, true}]
                           [--org --organization]
                           [--repository-id]

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性 值
參數群組: Global Policy Arguments
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性 值
參數群組: Global Policy Arguments
--detect

自動偵測企業組織。

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

Azure DevOps 組織網址。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設值,或未透過 git config 抓取,則為必要項目。範例:https://dev.azure.com/MyOrganizationName/。

--repository-id

Azure Repos 倉庫 (GUID) 的 ID。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性 值
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性 值
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性 值
預設值: False

az devops migrations resume

預覽

指揮組的「DevOps 遷移」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

繼續一個停止(暫停、失敗)的遷移。

az devops migrations resume [--acquire-policy-token]
                            [--change-reference]
                            [--detect {false, true}]
                            [--migration]
                            [--org --organization]
                            [--repository-id]
                            [--validate-only]

範例

繼續使用目前模式。

az devops migrations resume --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000

請以僅驗證模式繼續。

az devops migrations resume --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --validate-only

繼續遷移(清除僅驗證模式)。

az devops migrations resume --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000 --migration

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性 值
參數群組: Global Policy Arguments
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性 值
參數群組: Global Policy Arguments
--detect

自動偵測企業組織。

屬性 值
接受的值: false, true
--migration

將成功僅驗證遷移提升為完整遷移(setValidateOnly=false 與 statusRequested=active)。

屬性 值
預設值: False
--org --organization

Azure DevOps 組織網址。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設值,或未透過 git config 抓取,則為必要項目。範例:https://dev.azure.com/MyOrganizationName/。

--repository-id

Azure Repos 倉庫 (GUID) 的 ID。

--validate-only

請以僅驗證模式繼續。

屬性 值
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性 值
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性 值
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性 值
預設值: False

az devops migrations status

預覽

指揮組的「DevOps 遷移」目前處於預覽階段並正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得儲存庫的遷移狀態。

az devops migrations status [--acquire-policy-token]
                            [--change-reference]
                            [--detect {false, true}]
                            [--org --organization]
                            [--repository-id]

範例

透過儲存庫 ID 取得遷移狀態。

az devops migrations status --org https://dev.azure.com/myorg --repository-id 00000000-0000-0000-0000-000000000000

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性 值
參數群組: Global Policy Arguments
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性 值
參數群組: Global Policy Arguments
--detect

自動偵測企業組織。

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

Azure DevOps 組織網址。 您可以使用 az devops configure -d organization=ORG_URL 來設定預設組織。 如果未設定為預設值,或未透過 git config 抓取,則為必要項目。範例:https://dev.azure.com/MyOrganizationName/。

--repository-id

Azure Repos 倉庫 (GUID) 的 ID。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性 值
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性 值
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性 值
預設值: False