cicd-integrations
2023.10
false
  • 概述
    • 关于 CI/CD 管道
  • UiPath CLI
    • 关于 UiPath CLI
    • 下载 UiPath CLI
    • 兼容性矩阵
    • 运行 UiPath CLI
    • 管理 NuGet 订阅源
  • Azure DevOps 扩展程序
  • Jenkins 插件
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

CI/CD 集成用户指南

上次更新日期 2025年7月4日

管理 NuGet 订阅源

本节介绍如何管理内置 NuGet 订阅源。 此外,它还提供有关如何根据特定项目要求使用自定义 NuGet 订阅源的信息。

禁用内置 NuGet 订阅源

默认情况下, uipcli在以下内置订阅源中搜索依赖项: 您可以通过设置--disableBuiltInNugetFeeds参数来指定uipcli不使用内置订阅源。 此参数可用于以下任务: analyzepacktest run 。使用配置文件运行uipcli时,请设置"disableBuiltInNugetFeeds": true
“禁用内置的 NuGet 订阅源”图像
“禁用内置的 NuGet 订阅源”图像

使用自定义 NuGet 订阅源

打包自动化时可以使用自定义订阅源。

在 UiPath CLI 中使用自定义 nuget.config

要使用自定义订阅源,请执行以下步骤:

  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的文件夹中:
    “在 UiPath CLI 中使用自定义 nuget.config”图像

在 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
信任与安全
© 2005-2025 UiPath。保留所有权利。