UiPath Documentation
cicd-integrations
2025.10
true
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Guía del usuario de integraciones de CI/CD

Gestionar fuentes NuGet

Esta página describe los tres parámetros CLI que controlan qué fuentes de uipcli consulta al resolver dependencias de paquetes y muestra cómo utilizar cada uno.

Los mismos parámetros se aplican tanto a los proyectos de RPA independientes como a las soluciones.

Cómo resuelve uipcli las fuentes

De forma predeterminada, uipcli resuelve los paquetes de tres orígenes, fusionados en este orden:

  1. Fuentes integradas enviadas con la CLI:
    • 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 (si esta ruta está en el agente actual)
    • C:\Program Files (x86)\Microsoft SDKs\NuGetPackages (si esta ruta está en el agente actual)
  2. Configuración de NuGet en el nivel de host en la máquina que ejecuta la CLI, normalmente %AppData%\NuGet\NuGet.Config (nivel de usuario) y %ProgramFiles(x86)%\NuGet\Config (nivel de máquina).
  3. Un nuget.configpersonalizado que pasas a través de --nugetConfigFilePath.

Tres parámetros te permiten personalizar esta resolución predeterminada:

ParámetroQué controla
--nugetConfigFilePathAñade las fuentes desde un archivo nuget.config que proporciones.
--disableBuiltInNugetFeedsSuelta la capa 1 (las fuentes integradas).
--excludeConfiguredSourcesSuelta las capas 1 y 2. Solo permanecen las fuentes --nugetConfigFilePath .

Cuando ejecutas uipcli con un archivo de configuración, cada parámetro tiene un equivalente de estilo JSON: "nugetConfigFilePath": "...", "disableBuiltInNugetFeeds": true, "excludeConfiguredSources": true.

Añadir fuentes personalizadas con --nugetConfigFilePath

--nugetConfigFilePath apunta la CLI a un archivo nuget.config cuya <packageSources> quieres incluir en la resolución de dependencias. Esta es la forma principal de añadir una fuente privada (ProGet corporativa, Artifactory, Azure Artifacts, Nexus interno, etc.) sin modificar nada en el agente de compilación.

El archivo sigue el esquema NuGet estándar:

<?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>

Pasa la ruta en la línea de comandos:

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:

DirectiveEfecto
<clear /> Dentro <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>
Nota:

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.

Alternativa: coloca nuget.config en la carpeta de caché CLI

Si prefieres no pasar el parámetro en cada invocación, puedes soltar el nuget.config en la carpeta donde se almacena uipcli . El CLI lo recoge automáticamente.

Utilizar un nuget.config personalizado en Azure DevOps

Copia nuget.config a $(Agent.ToolsDirectory)/uipcli después del paso InstallPlatform :

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'

Utilizar un nuget.config personalizado en Jenkins

Copia nuget.config a ${WORKSPACE}/CLI después del paso InstallPlatform :

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()
                )
            }
        }
    }
}

Deshabilitar fuentes integradas con --disableBuiltInNugetFeeds

--disableBuiltInNugetFeeds elimina las fuentes integradas de UiPath de la resolución. Se sigue consultando la configuración de NuGet en el nivel de host y cualquier fuente de --nugetConfigFilePath .

Utilízalo cuando:

  • Tu red bloquea pkgs.dev.azure.com, gallery.uipath.com o api.nuget.org, y en su lugar duplicas los paquetes internamente.
  • Deseas un conjunto determinista de versiones de paquetes de actividades procedentes de tu propia fuente, no de gallery.uipath.com.
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

Restringir a fuentes personalizadas solo con --excludeConfiguredSources

--excludeConfiguredSources tanto las fuentes integradas como las fuentes de NuGet configuradas a nivel de usuario y máquina en el host que ejecuta la CLI (normalmente %AppData%\NuGet\NuGet.Config y %ProgramFiles(x86)%\NuGet\Config). La CLI resuelve los paquetes solo a partir de las fuentes definidas en --nugetConfigFilePath.

Utilízalo cuando:

  • Quieres compilaciones herméticas y reproducibles en las que solo se consulten las fuentes que declaras en el control de versiones.
  • Un agente de compilación compartido tiene fuentes en el nivel de máquina que no quieres sangrar en procesos específicos.
  • Está depurando problemas "funciona en el agente A, falla en el agente B" causados por una configuración de NuGet divergente en el nivel de host.
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
Nota:

Asegúrate de que nuget.config que pasas con --nugetConfigFilePath declara cada fuente que tu proyecto necesita, incluido cualquier equivalente de fuente de UiPath, porque no se consulta ninguna otra fuente.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado