UiPath Documentation
cicd-integrations
2025.10
true
Wichtig :
Bitte beachten Sie, dass dieser Inhalt teilweise mithilfe von maschineller Übersetzung lokalisiert wurde. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Benutzerhandbuch zu CI/CD-Integrationen

Verwalten von NuGet-Feeds

Auf dieser Seite werden die drei CLI-Parameter beschrieben, die steuern, welche NuGet-Feeds uipcli beim Auflösen von Paketabhängigkeiten konsultiert werden sollen, und es wird gezeigt, wie die einzelnen Elemente verwendet werden.

Die gleichen Parameter gelten sowohl für eigenständige RPA-Projekte als auch für Lösungen.

Wie uicli Feeds auflöst

Standardmäßig löst uipcli Pakete aus drei Quellen auf, die in dieser Reihenfolge zusammengeführt werden:

  1. Integrierte Feeds, die mit der CLI ausgeliefert werden:
    • https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json
    • https://gallery.uipath.com/api/v2
    • https://api.nuget.org/v3/index.json
    • C:\Program Files\Microsoft SDKs\NuGetPackages (wenn sich dieser Pfad auf dem aktuellen Agenten befindet)
    • C:\Program Files (x86)\Microsoft SDKs\NuGetPackages (wenn sich dieser Pfad auf dem aktuellen Agenten befindet)
  2. NuGet-Konfiguration auf Hostebene auf der Maschine, auf der die CLI ausgeführt wird, in der Regel %AppData%\NuGet\NuGet.Config (Benutzerebene) und %ProgramFiles(x86)%\NuGet\Config (Maschinenebene).
  3. Ein benutzerdefinierter nuget.config , den Sie über --nugetConfigFilePath übergeben.

Mit drei Parametern können Sie diese Standardauflösung anpassen:

ParameterWas es steuert
--nugetConfigFilePathFügt die Feeds aus einer nuget.config -Datei hinzu, die Sie bereitstellen.
--disableBuiltInNugetFeedsEntfernt Ebene 1 (die integrierten Feeds).
--excludeConfiguredSourcesLöscht die Ebenen 1 und 2. Nur die --nugetConfigFilePath -Feeds bleiben erhalten.

Wenn Sie uipcli mit einer Konfigurationsdatei ausführen, hat jeder Parameter ein JSON-Äquivalent: "nugetConfigFilePath": "...", "disableBuiltInNugetFeeds": true, "excludeConfiguredSources": true.

Hinzufügen benutzerdefinierter Feeds mit --nugetConfigFilePath

--nugetConfigFilePath verweist die CLI auf eine nuget.config -Datei, deren <packageSources> in die Abhängigkeitsauflösung aufgenommen werden soll. Dies ist die primäre Methode, um einen privaten Feed (UnternehmensproGet, Artifact, Azure Artifacts, internes Enterprise-Feed usw.) hinzuzufügen, ohne etwas am Build-Agent zu ändern.

Die Datei folgt dem Standardschema von NuGet:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="MyCustomFeed" value="https://my.corp.example/nuget/v3/index.json" />
  </packageSources>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="MyCustomFeed" value="https://my.corp.example/nuget/v3/index.json" />
  </packageSources>
</configuration>

Übergeben Sie den Pfad in der Befehlszeile:

uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config"
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config"

From 25.10.18 onwards, the file is honored end-to-end — the CLI forwards it to the WorkflowCompiler, which loads it through the NuGet libraries directly. The following directives all take effect:

DirectiveAuswirkung
<clear /> hinein <packageSources>Drops the inherited list of sources (built-in feeds and host-level configuration) before the rest of the file is applied.
<packageSourceCredentials>Per-source credentials. Basic authentication against private feeds (JFrog, Sonatype Nexus, internal Azure Artifacts, etc.) is handled by NuGet's native HTTP pipeline, including 401 challenges.
<packageSourceMapping>Restricts which package IDs (or ID prefixes) can be resolved from which sources.
<fallbackPackageFolders>Adds local folders that NuGet consults before going to the network. Useful for air-gapped builds.

Authenticated private feed (JFrog, Nexus, internal Azure Artifacts)

Declare the source and its credentials in the same file. The CLI does not need any extra parameters — the NuGet client picks the credentials up automatically when it hits the matching source:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="UiPath-Internal" value="https://artifactory.contoso.example/api/nuget/v3/uipath-feed/index.json" protocolVersion="3" />
  </packageSources>

  <packageSourceCredentials>
    <UiPath-Internal>
      <add key="Username" value="ci-bot" />
      <add key="ClearTextPassword" value="%ARTIFACTORY_TOKEN%" />
    </UiPath-Internal>
  </packageSourceCredentials>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="UiPath-Internal" value="https://artifactory.contoso.example/api/nuget/v3/uipath-feed/index.json" protocolVersion="3" />
  </packageSources>

  <packageSourceCredentials>
    <UiPath-Internal>
      <add key="Username" value="ci-bot" />
      <add key="ClearTextPassword" value="%ARTIFACTORY_TOKEN%" />
    </UiPath-Internal>
  </packageSourceCredentials>
</configuration>

Inject the password through a CI secret, not into the file directly. NuGet expands environment variables of the form %VAR% when it reads the file.

Restricting which sources resolve which packages

Use <packageSourceMapping> when you want UiPath activity packages to come from your internal mirror but allow other dependencies to fall through to a different feed:

<configuration>
  <packageSources>
    <add key="UiPath-Internal" value="https://artifactory.contoso.example/api/nuget/v3/uipath-feed/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>

  <packageSourceMapping>
    <packageSource key="UiPath-Internal">
      <package pattern="UiPath.*" />
    </packageSource>
    <packageSource key="nuget.org">
      <package pattern="*" />
    </packageSource>
  </packageSourceMapping>
</configuration>
<configuration>
  <packageSources>
    <add key="UiPath-Internal" value="https://artifactory.contoso.example/api/nuget/v3/uipath-feed/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>

  <packageSourceMapping>
    <packageSource key="UiPath-Internal">
      <package pattern="UiPath.*" />
    </packageSource>
    <packageSource key="nuget.org">
      <package pattern="*" />
    </packageSource>
  </packageSourceMapping>
</configuration>
Hinweis:

On CLI versions prior to 25.10.18, only the <packageSources> URLs were forwarded to the packager — <clear />, <packageSourceCredentials>, <packageSourceMapping>, and <fallbackPackageFolders> were silently ignored. To pin dependency resolution to your nuget.config on older CLI builds, combine --nugetConfigFilePath with --excludeConfiguredSources and provide credentials through the host's NuGet configuration instead.

Alternative: Platzieren Sie nuget.config im CLI-Cache-Ordner

Wenn Sie den Parameter nicht bei jedem Aufruf übergeben möchten, können Sie die nuget.config in dem Ordner ablegen, in dem uipcli zwischengespeichert wird. Die CLI übernimmt dies automatisch.

Verwenden eines benutzerdefinierten nuget.config in Azure DevOps

Kopieren Sie nuget.config nach dem Schritt InstallPlatform in $(Agent.ToolsDirectory)/uipcli :

trigger:
- main

pool:
  vmImage: ubuntu-latest

stages:
- stage: Demo
  jobs:
    - job: Demo
      steps:
        - task: UiPathInstallPlatform@6
          inputs:
            cliVersion: '25.10'

        - task: CopyFiles@2
          inputs:
            SourceFolder: '$(Build.SourcesDirectory)'
            Contents: 'nuget.config'
            TargetFolder: '$(Agent.ToolsDirectory)/uipcli'

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

pool:
  vmImage: ubuntu-latest

stages:
- stage: Demo
  jobs:
    - job: Demo
      steps:
        - task: UiPathInstallPlatform@6
          inputs:
            cliVersion: '25.10'

        - task: CopyFiles@2
          inputs:
            SourceFolder: '$(Build.SourcesDirectory)'
            Contents: 'nuget.config'
            TargetFolder: '$(Agent.ToolsDirectory)/uipcli'

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

Verwenden eines benutzerdefinierten nuget.config in Jenkins

Kopieren Sie nuget.config nach dem Schritt InstallPlatform in ${WORKSPACE}/CLI :

pipeline {
    agent {
        label 'jenkins-agent'
    }

    stages {
        stage('Clone') {
            steps {
                git (
                    branch: 'main',
                    url: 'https://github.com/your-org/your-repo.git'
                )
            }
        }

        stage('Install Platform') {
            steps {
                UiPathInstallPlatform (
                    cliVersion: '25.10',
                    traceLevel: 'Information'
                )
            }
        }

        stage('Copy nuget.config') {
            steps {
                bat 'copy nuget.config CLI\\nuget.config'
            }
        }

        stage('Pack') {
            steps {
                UiPathPack (
                    outputPath: '${WORKSPACE}/Output',
                    projectJsonPath: '${WORKSPACE}/project.json',
                    traceLevel: 'Information',
                    version: AutoVersion()
                )
            }
        }
    }
}
pipeline {
    agent {
        label 'jenkins-agent'
    }

    stages {
        stage('Clone') {
            steps {
                git (
                    branch: 'main',
                    url: 'https://github.com/your-org/your-repo.git'
                )
            }
        }

        stage('Install Platform') {
            steps {
                UiPathInstallPlatform (
                    cliVersion: '25.10',
                    traceLevel: 'Information'
                )
            }
        }

        stage('Copy nuget.config') {
            steps {
                bat 'copy nuget.config CLI\\nuget.config'
            }
        }

        stage('Pack') {
            steps {
                UiPathPack (
                    outputPath: '${WORKSPACE}/Output',
                    projectJsonPath: '${WORKSPACE}/project.json',
                    traceLevel: 'Information',
                    version: AutoVersion()
                )
            }
        }
    }
}

Deaktivieren integrierter Feeds mit --disableBuiltInNugetFeeds

--disableBuiltInNugetFeeds entfernt die integrierten Feeds von UiPath aus der Lösung. Die NuGet-Konfiguration auf Hostebene und alle Feeds aus --nugetConfigFilePath werden weiterhin berücksichtigt.

Gehen Sie so vor, wenn:

  • Ihr Netzwerk blockiert pkgs.dev.azure.com, gallery.uipath.com oder api.nuget.org und Sie spiegeln stattdessen die Pakete intern wider.
  • Sie möchten einen deterministischen Satz von Aktivitätspaketversionen, die aus Ihrem eigenen Feed und nicht aus gallery.uipath.com stammen.
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config" \
  --disableBuiltInNugetFeeds
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config" \
  --disableBuiltInNugetFeeds

Einschränken auf benutzerdefinierte Feeds nur mit --excludeConfiguredSources

--excludeConfiguredSources schließt sowohl die integrierten Feeds als auch die NuGet-Quellen aus, die auf Benutzer- und Maschinenebene auf dem Host konfiguriert sind, auf dem die CLI ausgeführt wird (normalerweise %AppData%\NuGet\NuGet.Config und %ProgramFiles(x86)%\NuGet\Config). Die CLI löst Pakete nur aus den in --nugetConfigFilePath definierten Feeds auf.

Gehen Sie so vor, wenn:

  • Sie möchten hermetische, reproduzierbare Builds, bei denen nur die Feeds abgefragt werden, die Sie in der Versionskontrolle deklarieren.
  • Ein gemeinsam genutzter Build-Agent verfügt über Feeds auf Maschinenebene, die nicht in bestimmte Pipelines eingebunden werden sollen.
  • Sie debuggen „funktioniert bei Agent A, schlägt bei Agent B fehl“-Probleme, die durch eine unterschiedliche NuGet-Konfiguration auf Hostebene verursacht werden.
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config" \
  --excludeConfiguredSources
uipcli package pack "C:\projects\MyProject\project.json" -o "C:\Output" \
  --nugetConfigFilePath "C:\ci\nuget.config" \
  --excludeConfiguredSources
Hinweis:

Stellen Sie sicher, dass die nuget.config die Sie mit --nugetConfigFilePath übergeben, jeden Feed deklariert, den Ihr Projekt benötigt – einschließlich aller UiPath-Feed-Äquivalente –, da keine andere Quelle konsultiert wird.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben