UiPath Documentation
cicd-integrations
2025.10
true
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

CI/CD 連携ユーザー ガイド

NuGet フィードを管理する

このページでは、パッケージの依存関係を解決するときにどの NuGet フィード uipcli 参照するかを制御する 3 つの CLI パラメーターについて説明し、それぞれの使用方法を示します。

スタンドアロンの RPA プロジェクトソリューションの両方に同じパラメーターが適用されます。

uipcli によるフィードの解決方法

既定では、 uipcli は 3 つのソースからパッケージを次の順序で解決します。

  1. 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 (このパスが現在のエージェント上にある場合)
    • C:\Program Files (x86)\Microsoft SDKs\NuGetPackages (このパスが現在のエージェント上にある場合)
  2. CLI を実行するマシンでのホスト レベルの NuGet の構成。通常は %AppData%\NuGet\NuGet.Config (ユーザー レベル) と %ProgramFiles(x86)%\NuGet\Config (マシン レベル)
  3. 通過するカスタム nuget.config--nugetConfigFilePath

次の 3 つのパラメーターを使用して、この既定の解像度をカスタマイズできます。

パラメーター制御するもの
--nugetConfigFilePath指定した nuget.config ファイルからフィードを追加します。
--disableBuiltInNugetFeedsレイヤー 1 (組み込みフィード) をドロップします。
--excludeConfiguredSourcesレイヤー 1 レイヤー 2 をドロップします。 --nugetConfigFilePath フィードのみが残ります。

構成ファイルを使用して uipcli を実行する場合、各パラメーターには同等の JSON スタイル ( "nugetConfigFilePath": "...""disableBuiltInNugetFeeds": true"excludeConfiguredSources": true) があります。

カスタム フィードの追加 --nugetConfigFilePath

--nugetConfigFilePath、依存関係の解決に<packageSources>を含める nuget.config ファイルを指定します。これは、ビルド エージェントを何も変更せずにプライベート フィード (企業の ProGet、Artifactory、Azure Artifacts、内部 Nexus など) を追加する主な方法です。

このファイルは、標準の 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>

コマンドラインでパスを渡します。

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:

Directive効果
<clear /> 中に <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>
注:

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.

別の方法: nuget.config を CLI キャッシュ フォルダーに配置します

すべての呼び出しでパラメーターを渡さない場合は、uipcliがキャッシュされているフォルダーにnuget.configをドロップできます。CLI は自動的に検出します。

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@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'

Jenkins でカスタム nuget.configを使用する

InstallPlatform手順の後にnuget.config${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()
                )
            }
        }
    }
}

組み込みフィードを無効化する --disableBuiltInNugetFeeds

--disableBuiltInNugetFeeds 、UiPath の組み込みフィードが解像度から削除されます。ホスト レベルの NuGet の構成と、 --nugetConfigFilePath からのフィードは引き続き参照されます。

これは、次の場合に使用します。

  • ネットワークは pkgs.dev.azure.comgallery.uipath.com、または api.nuget.orgをブロックし、代わりにパッケージを内部的にミラーリングします。
  • アクティビティ パッケージ バージョンが確定的に構成されていて、 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

カスタム フィードのみに制限する --excludeConfiguredSources

--excludeConfiguredSources には、組み込みフィードと、CLI を実行するホスト上のユーザー レベルおよびマシン レベルで設定された NuGet ソースの両方が除外されます (通常は %AppData%\NuGet\NuGet.Config および %ProgramFiles(x86)%\NuGet\Config)。CLI は、 --nugetConfigFilePathで定義されたフィードからのみパッケージを解決します。

これは、次の場合に使用します。

  • バージョン管理で宣言したフィードのみが参照される、密閉された再現可能なビルドが必要です。
  • 共有ビルドエージェントには、特定のパイプラインに出血させたくないマシンレベルのフィードがあります。
  • ホスト レベルの NuGet 構成の相違が原因で発生する、"エージェント A で動作し、エージェント B で失敗する" 問題をデバッグしています。
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
注:

他のソースは参照されないため、--nugetConfigFilePath と共に渡すnuget.configに、プロジェクトが必要とするすべてのフィード (UiPath フィードに相当するものも含む) が宣言されていることを確認してください。

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得