UIP AOPS 连接
“uip aops 连接”和“uip aops 存储库”的语法和选项,用于同步来源控件连接,并检查通过这些连接发现的存储库。
uip aops connection管理来源控件连接— 指向 Git 提供程序(GitHub 或 Azure DevOps)的按租户链接,StudioAdmin 用于发现存储库、自动化项目和解决方案。在 uip aops repo 中获得存储库标识符后,connection repos 将检查单个存储库的分支和自动化项目文件。有关共享概念和 SC 服务/CICD 服务拆分的uip aops概述,请参阅 概述。
连接创建需通过 Studio 管理员用户界面执行,此 CLI 仅按标识符使用已配置的连接。使用 connection list 发现标识符,然后使用 connection sync --wait 刷新。
大纲
uip aops connection list
uip aops connection state [--connection <id>]
uip aops connection sync [connection-id] [--wait] [--timeout <ms>] [--poll-interval <ms>]
uip aops connection delete <connection-id> -y
uip aops connection repos <connection-id> [--azure-projects-ids <csv>] [--organization-identifier <name>]
uip aops connection repos-bulk --ids <csv>
uip aops connection projects <connection-id> [--repository-ids <csv>] [--target-framework <name>] [--project-type <type>] [--azure-projects-ids <csv>] [--organization-identifier <name>] [--sort-by <field>] [--sort-order <asc|desc>] [--offset <n>] [--limit <n>] [--search <term>]
uip aops connection solutions <connection-id> [--offset <n>] [--limit <n>] [--search <term>]
uip aops connection azure-projects <connection-id> [--organization-identifier <name>]
uip aops repo branches <repo-id>
uip aops repo project-files <repo-id> [--reference <ref>]
uip aops connection list
uip aops connection state [--connection <id>]
uip aops connection sync [connection-id] [--wait] [--timeout <ms>] [--poll-interval <ms>]
uip aops connection delete <connection-id> -y
uip aops connection repos <connection-id> [--azure-projects-ids <csv>] [--organization-identifier <name>]
uip aops connection repos-bulk --ids <csv>
uip aops connection projects <connection-id> [--repository-ids <csv>] [--target-framework <name>] [--project-type <type>] [--azure-projects-ids <csv>] [--organization-identifier <name>] [--sort-by <field>] [--sort-order <asc|desc>] [--offset <n>] [--limit <n>] [--search <term>]
uip aops connection solutions <connection-id> [--offset <n>] [--limit <n>] [--search <term>]
uip aops connection azure-projects <connection-id> [--organization-identifier <name>]
uip aops repo branches <repo-id>
uip aops repo project-files <repo-id> [--reference <ref>]
UIP AOPS 连接列表
列出对当前用户可见的每个来源控件连接。
数据形状(--输出 json)
{
"Code": "ConnectionList",
"Data": [
{ "identifier": "f1e2d3c4-0000-0000-0000-000000000001", "name": "GitHub - main org", "type": "GitHub" }
]
}
{
"Code": "ConnectionList",
"Data": [
{ "identifier": "f1e2d3c4-0000-0000-0000-000000000001", "name": "GitHub - main org", "type": "GitHub" }
]
}
每隔一个identifier connection、repo 和 命令使用返回的project 。
UIP AOPS 连接状态
获取连接的当前同步状态。
选项
| 长 | 值 | 描述 |
|---|---|---|
--connection <id> | 字符串 | 筛选为单个连接标识符。客户端筛选器 — API 返回每个连接的状态,CLI 在本地进行筛选。 |
数据形状(--输出 json)
{
"Code": "ConnectionState",
"Data": [
{ "identifier": "f1e2d3c4-0000-0000-0000-000000000001", "syncState": "Success", "syncingInProgress": false }
]
}
{
"Code": "ConnectionState",
"Data": [
{ "identifier": "f1e2d3c4-0000-0000-0000-000000000001", "syncState": "Success", "syncingInProgress": false }
]
}
syncState 为 Success、Fail 或 Broken。
UIP AOPS 连接同步
为一个连接触发同步,如果省略 [connection-id],则触发组织中的所有连接。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
[connection-id] | 否 | 来自 connection list 的连接标识符。省略同步组织中的每个连接。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--wait | 标记 | 轮询状态端点,直到同步达到最终状态,而不是立即返回。 |
--timeout <ms> | 整数 | 设置 --wait 时的最长时间等待时间。默认 300000(5 分钟)。 |
--poll-interval <ms> | 整数 | 状态轮询之间的时间间隔。默认 2000。 |
触发器端点立即返回 202;如果未添加 --wait,则一旦同步加入队列 (Code: "ConnectionSyncStarted"),控制权就会返回。对于 --wait,非成功最终状态(例如Broken)将报告为失败,而不是成功。
示例
uip aops connection sync f1e2d3c4-0000-0000-0000-000000000001 --wait
uip aops connection sync f1e2d3c4-0000-0000-0000-000000000001 --wait
数据形状(--输出 json)
{ "Code": "ConnectionSynced", "Data": { "identifier": "f1e2d3c4-0000-0000-0000-000000000001", "syncState": "Success", "syncingInProgress": false } }
{ "Code": "ConnectionSynced", "Data": { "identifier": "f1e2d3c4-0000-0000-0000-000000000001", "syncState": "Success", "syncingInProgress": false } }
同步每个连接(无 connection-id)将在 Data 下返回一个数组,而不是一个对象。
UIP AOPS 连接删除
按标识符删除来源控件连接。永久 — 将无法再访问通过此连接发现的项目和解决方案。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<connection-id> | 是 | 来自 connection list 的连接标识符。 |
选项
| 长 | 描述 |
|---|---|
-y, --yes | 必需。确认此不可撤销的操作 — CLI 从不提示。 |
数据形状(--输出 json)
{ "Code": "ConnectionDeleted", "Data": { "ConnectionId": "f1e2d3c4-0000-0000-0000-000000000001" } }
{ "Code": "ConnectionDeleted", "Data": { "ConnectionId": "f1e2d3c4-0000-0000-0000-000000000001" } }
uip aops 连接存储库
列出通过单个连接可见的存储库。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<connection-id> | 是 | 来自 connection list 的连接标识符。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--azure-projects-ids <csv> | 逗号分隔 | 缩小范围到特定的 Azure DevOps 项目标识符。仅限 Azure 连接。 |
--organization-identifier <name> | 字符串 | 作用域为一个 Azure DevOps 组织。仅适用于 Azure 连接,适用于跨组织连接。 |
数据形状(--输出 json)
{ "Code": "ConnectionRepos", "Data": [ { "identifier": "abcd1234-0000-0000-0000-000000000001", "name": "automation-hub" } ] }
{ "Code": "ConnectionRepos", "Data": [ { "identifier": "abcd1234-0000-0000-0000-000000000001", "name": "automation-hub" } ] }
UIP AOPS 连接存储库-批量
在单次往返中获取多个连接的存储库。
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--ids <csv> | 逗号分隔 | 是 | 来自 connection list 的连接标识符。 |
数据形状(--输出 json)
{
"Code": "ConnectionReposBulk",
"Data": [
{ "ConnectionId": "f1e2d3c4-0000-0000-0000-000000000001", "Repositories": [ { "identifier": "abcd1234-0000-0000-0000-000000000001", "name": "automation-hub" } ] }
]
}
{
"Code": "ConnectionReposBulk",
"Data": [
{ "ConnectionId": "f1e2d3c4-0000-0000-0000-000000000001", "Repositories": [ { "identifier": "abcd1234-0000-0000-0000-000000000001", "name": "automation-hub" } ] }
]
}
每个连接一行 — ConnectionId 保留为明文值(而非规范化的键),因此在输出格式化后仍然存在,并反馈到 connection repos <id>。
UIP AOPS 连接项目
列出通过连接发现的自动化项目。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<connection-id> | 是 | 来自 connection list 的连接标识符。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--repository-ids <csv> | 逗号分隔 | 缩小范围到 connection repos 中的特定存储库标识符。 |
--target-framework <name> | 字符串 | 项目目标框架上的服务器端筛选器。 |
--project-type <type> | 字符串 | 项目类型的服务器端筛选器(例如Process、Library、Agent)。 |
--azure-projects-ids <csv> | 逗号分隔 | 仅限 Azure 连接。 |
--organization-identifier <name> | 字符串 | 仅限 Azure 连接。 |
--sort-by <field> | 字符串 | 要排序的字段(例如name、lastModifiedDate)。 |
--sort-order <asc|desc> | 枚举 | 排序方向与 --sort-by 合并。 |
--offset <n> | 整数 | 要跳过的数量。必须是 --limit 的倍数。默认 0。 |
--limit <n> | 整数 | 要返回的最大值。默认 10。 |
--search <term> | 字符串 | 项目名称的服务器端子字符串筛选器。 |
示例
uip aops connection projects f1e2d3c4-0000-0000-0000-000000000001
uip aops connection projects f1e2d3c4-0000-0000-0000-000000000001 \
--repository-ids abcd1234-0000-0000-0000-000000000001 --sort-by name --sort-order asc
uip aops connection projects f1e2d3c4-0000-0000-0000-000000000001
uip aops connection projects f1e2d3c4-0000-0000-0000-000000000001 \
--repository-ids abcd1234-0000-0000-0000-000000000001 --sort-by name --sort-order asc
数据形状(--输出 json)
{
"Code": "ConnectionProjects",
"Data": [
{ "ProjectId": "9999dddd-0000-0000-0000-000000000001", "Name": "Invoice Processing", "Description": "Daily invoice ingest", "Type": "Process", "Repository": "automation-hub" }
]
}
{
"Code": "ConnectionProjects",
"Data": [
{ "ProjectId": "9999dddd-0000-0000-0000-000000000001", "Name": "Invoice Processing", "Description": "Daily invoice ingest", "Type": "Process", "Repository": "automation-hub" }
]
}
UIP AOPS 连接解决方案
列出通过连接发现的 Studio 解决方案。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<connection-id> | 是 | 来自 connection list 的连接标识符。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--offset <n> | 整数 | 要跳过的数量。必须是 --limit 的倍数。默认 0。 |
--limit <n> | 整数 | 要返回的最大值。默认 20。 |
--search <term> | 字符串 | 解决方案名称的服务器端子字符串筛选器。 |
数据形状(--输出 json)
{ "Code": "ConnectionSolutions", "Data": { "result": [] } }
{ "Code": "ConnectionSolutions", "Data": { "result": [] } }
uip aops 连接 Azure-projects
列出可通过 Azure 连接访问的 Azure DevOps 项目。GitHub 连接始终返回空列表。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<connection-id> | 是 | 来自 connection list 的 Azure 连接标识符。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--organization-identifier <name> | 字符串 | 对于跨越多个组织的连接,作用域为一个 Azure DevOps 组织。 |
数据形状(--输出 json)
{ "Code": "ConnectionAzureProjects", "Data": [] }
{ "Code": "ConnectionAzureProjects", "Data": [] }
UIP AOPS 存储库
检查已通过 connection repos <connection-id> 出现的存储库。
uip aops 存储库分支
列出存储库的分支。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<repo-id> | 是 | 来自 connection repos <connection-id> 的存储库标识符。 |
数据形状(--输出 json)
{ "Code": "RepoBranches", "Data": [ { "Name": "main", "Main": true }, { "Name": "release", "Main": false } ] }
{ "Code": "RepoBranches", "Data": [ { "Name": "main", "Main": true }, { "Name": "release", "Main": false } ] }
使用分支 Name 作为 --reference、repo project-files 等的 project content。
uip aops 存储库项目文件
在给定引用下,列出存储库中的自动化项目文件(project.json 根)。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<repo-id> | 是 | 来自 connection repos <connection-id> 的存储库标识符。 |
选项
| 长 | 值 | 描述 |
|---|---|---|
--reference <ref> | 分支/标签/SHA | 默认为默认分支的标头。 |
数据形状(--输出 json)
{ "Code": "RepoProjectFiles", "Data": [] }
{ "Code": "RepoProjectFiles", "Data": [] }
相关内容
另请参阅
- 大纲
- UIP AOPS 连接列表
- 数据形状(--输出 json)
- UIP AOPS 连接状态
- 选项
- 数据形状(--输出 json)
- UIP AOPS 连接同步
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- UIP AOPS 连接删除
- 参数
- 选项
- 数据形状(--输出 json)
- uip aops 连接存储库
- 参数
- 选项
- 数据形状(--输出 json)
- UIP AOPS 连接存储库-批量
- 选项
- 数据形状(--输出 json)
- UIP AOPS 连接项目
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- UIP AOPS 连接解决方案
- 参数
- 选项
- 数据形状(--输出 json)
- uip aops 连接 Azure-projects
- 参数
- 选项
- 数据形状(--输出 json)
- UIP AOPS 存储库
- uip aops 存储库分支
- uip aops 存储库项目文件
- 相关内容
- 另请参阅