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

CI/CD 集成用户指南
上次更新日期 2025年10月23日
管理 NuGet 订阅源
本节介绍如何管理内置 NuGet 订阅源。 此外,它还提供有关如何根据特定项目要求使用自定义 NuGet 订阅源的信息。
禁用内置 NuGet订阅源
默认情况下, uipcli在以下内置订阅源中搜索依赖项:
https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.jsonhttps://gallery.uipath.com/api/v2https://api.nuget.org/v3/index.jsonC:\Program Files\Microsoft SDKs\NuGetPackages(如果此路径位于当前代理上)C:\Program Files (x86)\Microsoft SDKs\NuGetPackages(如果此路径位于当前代理上)
您可以通过设置--disableBuiltInNugetFeeds参数来指定uipcli不使用内置订阅源。 此参数可用于以下任务: analyze 、 pack和test run 。使用配置文件运行uipcli时,请设置"disableBuiltInNugetFeeds": true 。


使用自定义 NuGet 订阅源
打包自动化时可以使用自定义订阅源。
在 UiPath CLI 中使用自定义 nuget.config
要使用自定义订阅源,请执行以下步骤:
-
使用以下格式创建自定义
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><?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> -
将自定义
nuget.config文件放置在缓存uipcli的文件夹中:
在 Azure DevOps 中使用自定义 nuget.config
在InstallPlatform步骤之后,您需要更新配置并将nuget.config复制到$(Agent.ToolsDirectory)/uipcli ,如以下示例所示:
trigger:- mainpool: vmImage: ubuntu-lateststages:- 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:- mainpool: vmImage: ubuntu-lateststages:- 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() ) } } }}