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

CI/CD 集成用户指南

分析项目

先决条件

  • 创建项目。
  • 运行 CLI exe (对于 Windows 旧版)或dll (对于 Windows/Linux/macOS)文件。
  • 添加所需的 Orchestrator API 访问应用程序作用域

要分析项目,请执行以下步骤:

  1. 使用uipcli package运行package任务。您可以注意可用子任务的列表。
  2. 指定所需的参数并运行analyze子任务。下表介绍了必需参数。
备注:

项目验证作为analyze任务的一部分运行,无法跳过。验证消息在分析器输出中与工作流分析器消息一起显示。

图例:(*) - 可选,在使用其他包订阅源时建议使用。

参数

描述

Project(s) Path (pos. 0)必填 project.json文件的路径,或包含多个project.json文件的文件夹的路径。

--analyzerTraceLevel

选择分析后要输出的消息类型:

  • Off = don't show any message
  • 错误

    -警告

    -信息

    -详细

-stopOnRuleViolation

违反任何规则时,作业将失败。

--treatWarningsAsErrors

将警告视为错误。

--resultPath

要存储结果的 JSON 文件的完整路径。

如果不将其添加为参数,则结果将仅在标准控制台中打印。

--governanceFilePath

传递包含工作流分析器规则的监管策略。可以从 Studio 的导出压缩 ZIP 文件中下载策略,也可以从Studio导出的压缩 ZIP 文件中提取策略。

备注:

如果您指定使用策略,但策略文件不在上述路径中,则任务将失败。

--ignoredRules

要在分析期间忽略的规则列表,以逗号分隔。

-u--orchestratorUsername (*)

(如果您通过用户名和密码使用基本身份验证,则为必填项)

用于向 Orchestrator 进行身份验证的用户名。 您必须将其与相应的密码配对。

-p--orchestratorPassword (*)

(如果您通过用户名和密码使用基本身份验证,则为必填项)

用于对 Orchestrator 进行身份验证的密码。您必须将其与相应的用户名配对。

-t-orchestratorAuthToken (*)

(如果您使用基于令牌的身份验证,则为必填项

用于对 Orchestrator 进行身份验证的OAuth2 刷新令牌。您必须将其与帐户名称客户端 ID配对。

-a--orchestratorAccountName (*)

(如果您使用基于令牌的身份验证,则为必填项

Orchestrator CloudRPA 帐户名称。您必须将其与OAuth2 刷新令牌客户端 ID配对。

-A--orchestratorAccountForApp (*)

Orchestrator CloudRPA 帐户名称(组织名称)。您必须将其与外部应用程序的应用程序 ID应用程序密码应用程序作用域配对。

-I--orchestratorApplicationId (*)

(如果使用 外部应用程序身份验证, 则为必填项

外部应用程序 ID。您必须将其与 **“应用程序帐户”、 “应用程序密码”“应用程序作用域”配对。

-S--orchestratorApplicationSecret (*)

(如果使用 外部应用程序身份验证, 则为必填项

外部应用程序密码。您必须将其与“应用程序帐户”、“应用程序 ID”和“应用程序作用域”配对。

--orchestratorApplicationScope (*)

(对于 外部应用程序身份验证, 可选项

应用程序作用域列表,以单个空格分隔。在使用外部应用程序身份验证时为可选,因为系统会自动应用默认作用域。您必须将其与外部应用程序的“应用程序帐户”、 “应用程序 ID”“应用程序密码”配对。

--orchestratorFolder (*)

目标 Orchestrator 文件夹的名称。

要输入子文件夹,请确保同时输入父文件夹的名称和子文件夹的名称。例如,AccountingTeam\TeamJohn
--orchestratorUrl (*)

Orchestrator 实例的 URL。

--orchestratorTenant (*)

Orchestrator 实例的租户。

-l , --language

Orchestrator 语言。

--traceLevel

显示事件的跟踪。

--identityUrl 身份服务器的 URL。当 Orchestrator 在UiPath Automation Suite独立 Orchestrator (内部部署 MSI)上运行时为必需。Automation Cloud不需要 — CLI 从云 URL 解析身份服务器。

--nugetConfigFilePath

Path to the NuGet.Config file used during restore. From 25.10.18 onwards the file is honored end-to-end — <clear />, <packageSourceCredentials>, <packageSourceMapping>, and <fallbackPackageFolders> all take effect. See Managing NuGet feeds for details. On older builds, only <packageSources> URLs were applied.

--disableBuiltInNugetFeeds

禁用内置 NuGet 订阅源。

--excludeConfiguredSources

不包括内置订阅源以及在运行 CLI 的主机上在用户和计算机级别配置的 NuGet 源。CLI 仅解析--nugetConfigFilePath中定义的订阅源中的包。请参阅管理 NuGet 订阅源

--ca-cert 验证 Orchestrator 和 Identity Server TLS 证书时使用的一个或多个受信任的根 CA 证书文件(PEM、DER 或 PKCS#7)。重复标记或用逗号分隔多个路径。有关详细信息,请参阅信任自定义证书
--pinnedpubkey 固定服务器叶证书的公钥。格式: sha256//<base64> 。除标准证书验证以外进行检查。有关详细信息,请参阅信任自定义证书
提示:

对于私有证书颁发机构签名的 Orchestrator 实例(例如 UiPath Automation Suite),此命令也接受--ca-cert--pinnedpubkey参数。有关场景和示例,请参阅信任自定义证书

备注: 默认应用程序作用域

在不指定--orchestratorApplicationScope参数的情况下使用外部应用程序身份验证时,CLI 会自动应用这些默认的 Orchestrator 作用域:

OR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Robots.Read OR.Machines.Read OR.Jobs OR.TestSets OR.TestSetExecutions OR.Monitoring OR.Settings.Read

用法

uipcli package analyze <project_path> [--analyzerTraceLevel <analyzer_trace_level>] [--stopOnRuleViolation] [--treatWarningsAsErrors] [--resultPath <result_path>] [--governanceFilePath <governance_file_path>] [--ignoredRules <rule_id_1,rule_id_2>] [--orchestratorUrl <orchestrator_url> --orchestratorTenant <orchestrator_tenant>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --orchestratorApplicationScope <application_scope>] [--orchestratorFolder <folder_name>] [-l <language>] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identityUrl>] [--disableBuiltInNugetFeeds] [--excludeConfiguredSources]
uipcli package analyze <project_path> [--analyzerTraceLevel <analyzer_trace_level>] [--stopOnRuleViolation] [--treatWarningsAsErrors] [--resultPath <result_path>] [--governanceFilePath <governance_file_path>] [--ignoredRules <rule_id_1,rule_id_2>] [--orchestratorUrl <orchestrator_url> --orchestratorTenant <orchestrator_tenant>] [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --orchestratorApplicationScope <application_scope>] [--orchestratorFolder <folder_name>] [-l <language>] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identityUrl>] [--disableBuiltInNugetFeeds] [--excludeConfiguredSources]

最少命令示例

  • uipcli package analyze "C:\userprofile\AutomationProject\project.json" --traceLevel Information --resultPath "C:\userprofile\result.json"
  • uipcli package analyze "C:\userprofile\AutomationProject\project.json" --traceLevel Information --resultPath "C:\userprofile\result.json" --orchestratorUrl "https://orch-23-10-paas.cloudapp.azure.com/" --orchestratorTenant "TenantName" -u "orchestratorUsername" -p "********" --orchestratorFolder "FolderName"
  • uipcli package analyze "C:\userprofile\AutomationProject\project.json" --traceLevel Information --resultPath "C:\userprofile\result.json" --orchestratorUrl "https://orch-23-10-paas.cloudapp.azure.com/" --orchestratorTenant "TenantName" -A "organizationName" -I "76000552-3e4f-4590-9317-cdb420001f1d" -S '********' --orchestratorApplicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" --orchestratorFolder "FolderName" --identityUrl "https://orch-23-10-paas.cloudapp.azure.com/identity"
  • uipcli package analyze "C:\userprofile\AutomationProject\project.json" --traceLevel Information --resultPath "C:\userprofile\result.json" --orchestratorUrl "https://automation-suite.base.url.com/" --orchestratorTenant "TenantName" -A "organizationName" -I "3f6239b9-e0e8-465e-a429-d9ffd1d9e57a" -S '********' --orchestratorApplicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" --orchestratorFolder "FolderName"
  • uipcli package analyze "C:\userprofile\AutomationProject\project.json" --traceLevel Information --resultPath "C:\userprofile\result.json" --orchestratorUrl "https://cloud.uipath.com/" --orchestratorTenant "TenantName" -A "organizationName" -I "becc663c-8f1e-409a-a75f-c00330d80bc8" -S '********' --orchestratorApplicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" --orchestratorFolder "FolderName"
  • 先决条件
  • 用法
  • 最少命令示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新