automation-ops
latest
false
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
Automation Ops 用户指南
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated 2024年10月16日

About UiPath CLI

UiPath™ 提供命令行界面 (CLI),允许您执行某些预定义任务,以管理和测试 RPA 包。 UiPath CLI 的目的是轻松地将这些功能与第三方工具(如 GitLab、Jenkins 等)集成,而无需插件。

备注:

UiPath CLI 可与通过 Automation Cloud™、Automation Suite 部署的 Orchestrator 一起使用,或独立使用。

UiPath CLI 的常见用例包括:

  • 将 Studio 项目打包到 NuGet 包中。
  • 正在将 NuGet 包部署到 Orchestrator。
  • 在 Orchestrator 中运行作业。
  • 在 Orchestrator 中运行测试集。

UiPath CLI 包含两种类型:

  1. UiPath.CLI.Windows

    • 仅在 Windows 设备上运行。
    • 构建 Windows - LegacyWindows跨平台 项目。
  2. UiPath.CLI

    • 仅在 Linux 设备上运行。
    • 仅构建 跨平台 项目。
备注:
  • 注意:UiPath CLI 不支持 SSO 连接。

  • UiPath CLI 不能用于构建使用本地触发器的项目。

  • UiPath CLI 缺少对包进行签名的功能,而从 Studio 发布包时可以使用此功能。 在这种情况下,唯一的选项是在使用 UiPath CLI 构建包后对包进行签名。 有关详细信息,请参阅签名命令。 此签名选项也适用于 Azure DevOps 和 Jenkins。

先决条件

Here you can verify the compatibility between the CLI version, the required .NET version, and the target Robot version.

CLI version

需要 .NET 版本

已构建自动化的目标 Robot 版本

24.10

.NET 8

24.10+

23.10

.NET 6

23.10+

23.4

.NET 6

23.4+

For UiPath.CLI.Windows, you must also install .NET Desktop Runtime, that comes with the .NET SDK as well.

Downloading UiPath CLI

You can download any version of the UiPath CLI from the UiPath Official Public Feed.

  1. 转到 UiPath 官方公共订阅源
  2. 在“ 按关键字筛选” 搜索栏中,键入uipath.cli
  3. 选择以下任一选项:
    • UiPath.CLI - UiPath CLI designed for Linux devices
    • UiPath.CLI.Windows - UiPath CLI designed for Windows devices
  4. 转到“ 版本 ” 选项卡,然后选择要下载的 CLI 版本。
  5. 选择“ 下载”
  6. 打开下载 NUPKG 文件的文件夹,右键单击该文件夹,然后将文件提取到文件夹中。
结果:系统将创建一个与 NUPKG 文件同名的文件夹。 此文件夹包含 UiPath CLI 的内容。 所有操作的入口点为uipcli.exe (对于 UiPath.CLI.Windows)或uipcli.dll (对于 UiPath.CLI),位于tools文件夹中。

UiPath.CLI.Windows 兼容性列表

您用于创建项目的 UiPath Studio 版本需要与 UiPath.CLI.Windows 的版本匹配。

图例available - 兼容;不可用 - 不兼容。

Orchestrator

项目类型

UiPath.CLI.Windows 23.10

UiPath.CLI.Windows 23.6

UiPath.CLI.Windows 22.10

版本 2023.10.x PaaS

Windows - 旧版

available

available

available

版本 2023.10.x PaaS

Windows

available

available

available

版本 2023.10.x PaaS

跨平台

available

available

available

2021.10.x内部部署

Windows - 旧版

available

available

available

2021.10.x内部部署

Windows

available

available

available

2021.10.x内部部署

跨平台

available

available

available

2021.10.xPaaS

Windows - 旧版

available

available

available

2021.10.xPaaS

Windows

available

available

available

2021.10.xPaaS

跨平台

available

available

available

2022.4.x

Windows - 旧版

available

available

available

2022.4.x

Windows

available

available

available

2022.4.x

跨平台

available

available

available

2022.10.x

Windows - 旧版

available

available

available

2022.10.x

Windows

available

available

available

2022.10.x

跨平台

available

available

available

2023.4.xWindows - 旧版

available

available

available

2023.4.xWindows

available

available

available

2023.4.x跨平台

available

available

available

Cloud

Windows - 旧版

available

available

available

Cloud

Windows

available

available

available

Cloud

跨平台

available

available

available

UiPath.CLI 兼容性列表

您用于创建项目的 UiPath Studio 的版本需要与 UiPath.CLI 的版本匹配。 例如,如果您使用 UiPath Studio 2021.10 创建项目, 您需要使用 21.10 版本的 UiPath.CLI。

图例available - 兼容;不可用 - 不兼容。

Orchestrator项目类型UiPath.CLI 23.10UiPath.CLI 23.6UiPath.CLI 22.10UiPath.CLI 22.4UiPath.CLI 21.10

版本 2023.10.x PaaS

Windows - 旧版

不可用

不可用

不可用

不可用

不可用

版本 2023.10.x PaaS

Windows

不可用

不可用

不可用

不可用

不可用

版本 2023.10.x PaaS

跨平台

available

available

available

available

available

2021.10.x内部部署

Windows - 旧版

不可用

不可用

不可用

available

available

2021.10.x内部部署

Windows

不可用

不可用

不可用

不可用

不可用

2021.10.x内部部署

跨平台

available

available

available

available

available

2021.10.xPaaS

Windows - 旧版

不可用

不可用

不可用

available

available

2021.10.xPaaS

Windows

不可用

不可用

不可用

不可用

不可用

2021.10.xPaaS

跨平台

available

available

available

available

available

2022.4.x

Windows - 旧版

不可用

不可用

不可用

available

available

2022.4.x

Windows

不可用

不可用

不可用

不可用

不可用

2022.4.x

跨平台

available

available

available

available

available

2022.10.x

Windows - 旧版

不可用

不可用

不可用

available

available

2022.10.x

Windows

不可用

不可用

不可用

不可用

不可用

2022.10.x

跨平台

available

available

available

available

available

2023.4.xWindows - 旧版

不可用

不可用

不可用

available

available

2023.4.xWindows

不可用

不可用

不可用

不可用

不可用

2023.4.x跨平台

available

available

available

available

available

Cloud

Windows - 旧版

不可用

不可用

不可用

available

available

Cloud

Windows

不可用

不可用

不可用

不可用

不可用

Cloud

跨平台

available

available

available

available

available

Managing NuGet feeds

This section describes how you can manage the build-in NuGet feeds. Moreover, it provides information on how you can use custom NuGet feeds according to your specific project requirements.

禁用内置 NuGet 订阅源

默认情况下, uipcli在以下内置订阅源中搜索依赖项: You can specify uipcli to not use the built-in feeds by setting the --disableBuiltInNugetFeeds parameter. This parameter can be used to the following tasks: analyze, pack, and test run.When you run uipcli with a configuration file, set "disableBuiltInNugetFeeds": true.
docs image
docs image

使用自定义 NuGet 订阅源

You can use custom feeds when packing an automation.

Using custom nuget.config in UiPath CLI

To use custom feed, take the following steps:

  1. 使用以下格式创建自定义nuget.config文件:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="test custom feed" value="custom_feed_url" />
      </packageSources>
    </configuration><?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="test custom feed" value="custom_feed_url" />
      </packageSources>
    </configuration>
  2. 将自定义nuget.config文件放置在缓存uipcli的文件夹中:
    docs image

在 Azure DevOps 中使用自定义 nuget.config

InstallPlatform步骤之后,您需要更新配置并将nuget.config复制到$(Agent.ToolsDirectory)/uipcli ,如以下示例所示:
trigger:
- main

pool:
  vmImage: ubuntu-latest

stages:
- stage: Demo
  jobs:
    - job: Demo
      steps:
        - task: UiPathInstallPlatform@4
          inputs:
            cliVersion: 'X_23.6.8581.19168'
        
        - task: CopyFiles@2
          inputs:
            SourceFolder: '$(Build.SourcesDirectory)'
            Contents: 'nuget.config'
            TargetFolder: '$(Agent.ToolsDirectory)/uipcli'

        - task: UiPathPack@4
          inputs:
            versionType: 'AutoVersion'
            projectJsonPath: '$(Build.SourcesDirectory)/AutomationProjects/CrossPlatform/VB/ProjectWithCustomLibraryFromOrchestrator_CrossPlatform_VB/project.json'
            outputPath: '$(Build.ArtifactStagingDirectory)/Output'
            traceLevel: 'Information'trigger:
- main

pool:
  vmImage: ubuntu-latest

stages:
- stage: Demo
  jobs:
    - job: Demo
      steps:
        - task: UiPathInstallPlatform@4
          inputs:
            cliVersion: 'X_23.6.8581.19168'
        
        - task: CopyFiles@2
          inputs:
            SourceFolder: '$(Build.SourcesDirectory)'
            Contents: 'nuget.config'
            TargetFolder: '$(Agent.ToolsDirectory)/uipcli'

        - task: UiPathPack@4
          inputs:
            versionType: 'AutoVersion'
            projectJsonPath: '$(Build.SourcesDirectory)/AutomationProjects/CrossPlatform/VB/ProjectWithCustomLibraryFromOrchestrator_CrossPlatform_VB/project.json'
            outputPath: '$(Build.ArtifactStagingDirectory)/Output'
            traceLevel: 'Information'

在 Jenkins 中使用自定义 nuget.config

InstallPlatform步骤之后,您需要更新配置并将nuget.config复制到${WORKSPACE}/CLI ,如以下示例所示:
pipeline {
    agent {
        label 'plugins-jenkins-lts-agent-01'
    }

    stages {
        stage('Clone') {
            steps {
                git (
                    branch: 'main',
                    url: 'https://github.com/al3xandru-uipath-qa/CI-Plugins-Customer-Support.git'
                )
            }
        }
        
        stage('Install Platform') {
            steps {
                UiPathInstallPlatform (
                    traceLevel: 'Information'
                )
            }
        }
        
        stage('Copy nuget.config') {
            steps {
                bat 'copy nuget.config CLI\\nuget.config'
            }
        }
        
        stage('Pack') {
            steps {
                UiPathPack (
                    outputPath: '${WORKSPACE}/Output',
                    projectJsonPath: '${WORKSPACE}/AutomationProjects/CrossPlatform/VB/ProjectWithCustomLibraryFromOrchestrator_CrossPlatform_VB/project.json',
                    traceLevel: 'Information',
                    version: AutoVersion()
                )
            }
        }
    }
}pipeline {
    agent {
        label 'plugins-jenkins-lts-agent-01'
    }

    stages {
        stage('Clone') {
            steps {
                git (
                    branch: 'main',
                    url: 'https://github.com/al3xandru-uipath-qa/CI-Plugins-Customer-Support.git'
                )
            }
        }
        
        stage('Install Platform') {
            steps {
                UiPathInstallPlatform (
                    traceLevel: 'Information'
                )
            }
        }
        
        stage('Copy nuget.config') {
            steps {
                bat 'copy nuget.config CLI\\nuget.config'
            }
        }
        
        stage('Pack') {
            steps {
                UiPathPack (
                    outputPath: '${WORKSPACE}/Output',
                    projectJsonPath: '${WORKSPACE}/AutomationProjects/CrossPlatform/VB/ProjectWithCustomLibraryFromOrchestrator_CrossPlatform_VB/project.json',
                    traceLevel: 'Information',
                    version: AutoVersion()
                )
            }
        }
    }
}

此页面有帮助吗?

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