cicd-integrations
2025.10
true
- 概述
- UiPath CLI
- Azure DevOps 扩展程序
- Jenkins 插件
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。

CI/CD 集成用户指南
上次更新日期 2025年11月18日
身份验证和作用域
所有解决方案命令都需要通过 Orchestrator 中配置的外部应用程序进行身份验证。与独立的项目任务不同,解决方案不支持计算机或交互式身份验证方法。
身份验证要求
解决方案命令仅通过OAuth2 使用外部应用程序进行身份验证。
在运行任何解决方案 CLI 命令之前,您必须在 Orchestrator 管理员中配置具有适当作用域的外部应用程序。
所需的 OAuth 作用域
解决方案使用一组不同于标准 Orchestrator 作用域的专用应用程序作用域。使用以下作用域为所有解决方案操作配置外部应用程序:
CI/CD 密码的复制粘贴格式:
AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.WriteAutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write这种以空格分隔的单行格式可直接用于:
- Azure DevOps 变量组
- GitHub 存储库密码
- Jenkins 凭据存储
注意:以下操作在本地运行,因此不需要身份验证:
restore- 在本地恢复依赖项analyze- 在本地验证项目pack- 在本地创建包
常用身份验证参数
与 Orchestrator 交互的所有解决方案命令都需要以下参数:
| 参数 | 描述 | 示例 |
|---|---|---|
-U | Orchestrator URL | https://cloud.uipath.com/ |
-T | Orchestrator 租户名称 | DefaultTenant |
-A | 组织名称 | myorg |
-I | 外部应用程序 ID | 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
-S | 外部应用程序密码 | **** (确保安全) |
--applicationScope | 以空格分隔的作用域列表 | 请参阅上述作用域 |
--traceLevel | 日志记录级别 | Information, Verbose, Warning |
设置外部应用程序
要为解决方案创建外部应用程序,请执行以下操作:
- 以管理员身份登录 Orchestrator。
- 导航到“管理” → “外部应用程序” 。
- 点击“添加应用程序” 。
- 提供名称(例如
CI-CD-Solutions)。 - 选择机密应用程序作为应用程序类型。
- 添加上面列出的所需作用域。
- 复制应用程序 ID和密码,并将其安全地存储在 CI/CD 密码管理器中。
有关配置外部应用程序的详细说明,请参阅管理外部 OAuth 应用程序。
使用自定义 Orchestrator 订阅源
在还原操作期间使用 Orchestrator 中的自定义活动订阅源时,请使用以下替代参数:
| 标准参数 | 自定义订阅源参数 |
|---|---|
--applicationScope | --libraryOrchestratorApplicationScope |
-T (租户) | --libraryOrchestratorTenant |
-U (URL) | --libraryOrchestratorUrl |
| (文件夹) | --libraryOrchestratorFolder |
示例:
uipcli solution restore <solution-path> \ -A myorg \ -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ -S **** \ --libraryOrchestratorApplicationScope "OR.Folders OR.Settings.Read" \ --libraryOrchestratorTenant DefaultTenant \ --libraryOrchestratorUrl https://cloud.uipath.com/ \ --libraryOrchestratorFolder MyFolderuipcli solution restore <solution-path> \ -A myorg \ -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ -S **** \ --libraryOrchestratorApplicationScope "OR.Folders OR.Settings.Read" \ --libraryOrchestratorTenant DefaultTenant \ --libraryOrchestratorUrl https://cloud.uipath.com/ \ --libraryOrchestratorFolder MyFolder安全性和最佳实践
- 永远不要在管道 YAML 或脚本中对密码进行硬编码。
- 使用 CI/CD 平台的密码管理:
- Azure DevOps:具有“密码”变量的变量组。
- GitHub Actions:存储库或组织密码。
- Jenkins:凭据存储。
- 定期轮换外部应用程序密码。
- 针对不同的环境(开发、测试、生产)使用单独的外部应用程序。
- 应用最小权限作用域 - 仅授予每个管道所需的权限。