cicd-integrations
2025.10
true
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

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 交互的所有解决方案命令都需要以下参数:

参数描述示例
-UOrchestrator URLhttps://cloud.uipath.com/
-TOrchestrator 租户名称DefaultTenant
-A组织名称myorg
-I外部应用程序 ID12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-S外部应用程序密码**** (确保安全)
--applicationScope以空格分隔的作用域列表请参阅上述作用域
--traceLevel日志记录级别Information, Verbose, Warning

设置外部应用程序

要为解决方案创建外部应用程序,请执行以下操作:

  1. 以管理员身份登录 Orchestrator
  2. 导航到“管理”“外部应用程序”
  3. 点击“添加应用程序”
  4. 提供名称(例如CI-CD-Solutions )。
  5. 选择机密应用程序作为应用程序类型。
  6. 添加上面列出的所需作用域。
  7. 复制应用程序 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:凭据存储。
  • 定期轮换外部应用程序密码。
  • 针对不同的环境(开发、测试、生产)使用单独的外部应用程序。
  • 应用最小权限作用域 - 仅授予每个管道所需的权限。

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。