Azure DevOps服务
本文列出了用于运行企业实时迁移(ELM)的 Azure DevOps CLI 命令和参数,以及 CLI 在迁移过程中返回的状态和阶段值。
Important
用于 cutover now 标准直接转换流。 该 cutover set 命令仅适用于需要特定未来窗口的特殊情况;不建议使用默认方法。
指令
| Command | 必需的参数 | 可选参数 | HTTP | Description |
|---|---|---|---|---|
list |
--org |
--include-inactive、--detect |
GET | 列出迁移。 默认情况下,CLI 仅返回活动迁移。 |
status |
--org、--repository-id |
--detect |
GET | 获取一个迁移的详细状态。 |
create |
--org、--repository-id、--target-repository、--target-owner-user-id、--service-endpoint-id、--agent-pool |
--validate-only、--cutover-date、--skip-validation、--detect |
POST | 创建新的迁移。 |
pause |
--org、--repository-id |
--detect |
PUT | 暂停活动迁移。 |
resume |
--org、--repository-id |
--validate-only、--migration、--detect |
PUT | 恢复停止的迁移。 |
cutover now |
--org、--repository-id |
--detect |
PUT | 立即启动直接转换并返回评审结果。 将此用作直接转换的标准路径。 |
cutover set |
--org、--repository-id、--date |
--detect |
PUT | 仅当需要特定的未来窗口时,才计划直接转换日期和时间。 |
cutover cancel |
--org、--repository-id |
--detect |
PUT | 取消计划的直接转换。 |
cutover review |
--org、--repository-id |
列出等待审批的直接转换失败。 | ||
cutover approve |
--org、--repository-id |
--accept-failures、--pipelines-verified、--detect |
PUT | 批准直接转换并跳过列出的失败或确认管道验证。 |
abandon |
--org、--repository-id |
--detect |
DELETE | 永久删除迁移。 提示进行确认。 |
参数详细信息
| 参数 | 类型 | 使用者 | Description |
|---|---|---|---|
--org |
URL | 所有 | Azure DevOps组织 URL,例如 https://dev.azure.com/<org>。 将此值设置为默认值。 |
--repository-id |
GUID | 除 list |
Azure Repos存储库 GUID。 从 az repos show --query id中获取值。 |
--target-repository |
URL | create |
例如 https://<enterprise>.ghe.com/<org>/<repo>,目标存储库 URL。 服务器验证此值。 |
--target-owner-user-id |
字符串 | create |
GitHub目标存储库所有者的用户 ID(句柄)。 |
--service-endpoint-id |
GUID | create |
Azure DevOps保存用于向目标进行身份验证GitHub PAT 的服务连接 ID。 |
--agent-pool |
字符串 | create |
迁移工作的代理池名称。 |
--validate-only |
标志 |
create、resume |
打开 create:仅运行迁移前检查。 打开 resume:切换到仅验证模式。 |
--migration |
标志 | resume |
切换到完全迁移模式(仅清除验证)。 与 --validate-only 互斥。 |
--cutover-date |
ISO 8601 | create |
例如 2030-12-31T11:59:00Z,在创建时预先安排直接转换。 |
--date |
ISO 8601 | cutover set |
例如 2030-12-31T11:59:00Z,仅针对特定的未来窗口计划直接转换日期和时间。 |
--skip-validation |
字符串 | create |
要跳过的验证策略的逗号分隔列表。 |
--accept-failures |
整数 | cutover approve |
批准直接转换时要接受的未解析项目数。 |
--pipelines-verified |
标志 | cutover approve |
确认在直接转换之前检查并验证了管道重新重排。 |
--include-inactive |
标志 | list |
包括已完成、失败和挂起的迁移。 |
--detect |
标志 | 所有 | 从 git 远程自动检测组织(默认: true) 。 使用 --detect false 进行禁用。 |
迁移阶段
| 阶段 | Description |
|---|---|
| Validation | 正在执行迁移前检查。 |
| Synchronization | 复制和同步存储库内容。 |
| 直接转换 | 执行最终同步并迁移到 GitHub。 |
| 已迁移 | 迁移完成。 GitHub是记录系统。 |
迁移状态
| 地位 | Meaning |
|---|---|
| Active | 迁移正在进行中。 |
| 成功/已完成 | 当前阶段成功完成。 |
| Failed | 出错。 修复问题后,可以恢复迁移。 |
| 已暂停 | 手动暂停。 可以恢复迁移。 |