- 概要
- UiPath CLI
- Azure DevOps 拡張機能
- Jenkins プラグイン

CI/CD 連携ユーザー ガイド
ソリューションをパッケージ化する
pack コマンドは、Orchestrator のソリューションにアップロードできるデプロイ可能なソリューション パッケージ (.zip アーカイブ) を作成します。
コマンド構文
uipcli solution pack <solution-path> [options]uipcli solution pack <solution-path> [options]パラメーター:
| パラメーター | 説明 | Required |
|---|---|---|
<solution-path> (pos. 0) | ソリューション フォルダーまたは .uipx ファイルへのパス | はい |
--output | パッケージの作成先ディレクトリ | はい |
--version | x.y.z形式のバージョン番号です。 | はい |
-A、 --libraryOrchestratorAccountForApp (*) | Orchestrator Cloud RPA のアカウント名 (組織名) です。外部アプリケーションの アプリケーション ID、アプリケーション シークレット、 アプリケーション スコープ と組み合わせて使用する必要があります。 ソリューション プロジェクトが Orchestrator フィードのライブラリ、または Orchestrator にデプロイされた別のプロセスに依存している場合は必須になります。 | いいえ |
-I 、 、--libraryOrchestratorApplicationId (*) ( 外部アプリケーション認証 を使用する場合は 必須) | 外部アプリケーション ID です。アプリケーション アカウント、アプリケーション シークレット、アプリケーション スコープと組み合わせて使用する必要があります。ソリューション プロジェクトが Orchestrator フィードのライブラリ、または Orchestrator にデプロイされた別のプロセスに依存している場合、これは必須になります。 | いいえ |
-S、 、--libraryOrchestratorApplicationSecret (*) ( 外部アプリケーション認証 を使用する場合は 必須) | 外部アプリケーション シークレットです。アプリケーション アカウント、アプリケーション ID、アプリケーション スコープと組み合わせて使用する必要があります。ソリューション プロジェクトが Orchestrator フィードのライブラリ、または Orchestrator にデプロイされた別のプロセスに依存している場合、これは必須になります。 | いいえ |
--libraryOrchestratorApplicationScope (*) (Optional for external application authentication) | アプリケーション スコープを単一のスペースで区切って列挙したリストです。外部アプリケーションの アプリケーション アカウント、 アプリケーション ID、 アプリケーション シークレット と組み合わせて使用する必要があります。ソリューション プロジェクトが Orchestrator フィードのライブラリ、または Orchestrator にデプロイされた別のプロセスに依存している場合、これは必須になります。 | いいえ |
--libraryOrchestratorUrl (*) | Orchestrator インスタンスの URL です。ソリューション プロジェクトが Orchestrator フィードのライブラリ、または Orchestrator にデプロイされた別のプロセスに依存している場合、これは必須になります。 | いいえ |
--libraryOrchestratorTenant (*) | Orchestrator インスタンスのテナントです。ソリューション プロジェクトが Orchestrator フィードのライブラリ、または Orchestrator にデプロイされた別のプロセスに依存している場合、これは必須になります。 | いいえ |
--libraryIdentityUrl(PaaS または MSI デプロイに必要) | Identity Server の URL です。 | いいえ |
--libraryOrchestratorFolder (*) | 対象の Orchestrator フォルダーの名前です。 サブフォルダーを入力するには、親フォルダーの名前とサブフォルダーの名前の両方を入力してください。例: AccountingTeam\TeamJohn | いいえ |
--disableBuiltInNugetFeeds | 組み込みの NuGet フィードを無効にします。 | いいえ |
--repositoryUrl | プロジェクトのバージョン管理が行われるリポジトリ URL です。 | いいえ |
--repositoryCommit | プロジェクトのビルド元のリポジトリ コミット。 | いいえ |
--repositoryBranch | プロジェクトの構築元のリポジトリブランチ。 | いいえ |
--repositoryType | VCS システム リポジトリの種類。 | いいえ |
--projectUrl | Automation Hub のアイデアの URL | いいえ |
--releaseNotes | リリース ノートを追加する | いいえ |
--author | The package author. | いいえ |
--traceLevel | イベントのトレースを表示します。 | いいえ |
When using external application authentication without specifying the --libraryOrchestratorApplicationScope parameter, the CLI automatically applies these default Orchestrator scopes:
Solutions.Packages Solutions.Deployments OR.Execution
例
uipcli solution pack C:\Solutions\MySolution \ --output C:\Output \ --version 1.2.3 \ --traceLevel Verboseuipcli solution pack C:\Solutions\MySolution \ --output C:\Output \ --version 1.2.3 \ --traceLevel Verboseこれにより、次のようなパッケージファイルが作成されます。
C:\Output\MySolution.1.2.3.zipC:\Output\MySolution.1.2.3.zip完全なパラメーターの例
uipcli solution pack C:\Solutions\MySolution \ --output C:\Output \ --version 1.2.3 \ --libraryOrchestratorAccountForApp MyOrgAccount \ --libraryOrchestratorApplicationId ******* \ --libraryOrchestratorApplicationSecret ******* \ --libraryOrchestratorApplicationScope "OR.Assets OR.Folders OR.Projects" \ --libraryOrchestratorUrl https://cloud.uipath.com/myOrgName/myTenantName \ --libraryOrchestratorTenant myTenantName \ --libraryIdentityUrl https://identity.uipath.com \ --libraryOrchestratorFolder "AccountingTeam\TeamJohn" \ --disableBuiltInNugetFeeds \ --repositoryUrl https://github.com/my-org/my-repo \ --repositoryCommit 7f3a9c2 \ --repositoryBranch main \ --repositoryType git \ --projectUrl https://automationhub.uipath.com/ideas/1234 \ --releaseNotes "Initial packaged solution version" \ --traceLevel Verbose --author ExampleAuthoruipcli solution pack C:\Solutions\MySolution \ --output C:\Output \ --version 1.2.3 \ --libraryOrchestratorAccountForApp MyOrgAccount \ --libraryOrchestratorApplicationId ******* \ --libraryOrchestratorApplicationSecret ******* \ --libraryOrchestratorApplicationScope "OR.Assets OR.Folders OR.Projects" \ --libraryOrchestratorUrl https://cloud.uipath.com/myOrgName/myTenantName \ --libraryOrchestratorTenant myTenantName \ --libraryIdentityUrl https://identity.uipath.com \ --libraryOrchestratorFolder "AccountingTeam\TeamJohn" \ --disableBuiltInNugetFeeds \ --repositoryUrl https://github.com/my-org/my-repo \ --repositoryCommit 7f3a9c2 \ --repositoryBranch main \ --repositoryType git \ --projectUrl https://automationhub.uipath.com/ideas/1234 \ --releaseNotes "Initial packaged solution version" \ --traceLevel Verbose --author ExampleAuthorバージョン管理の要件
スタンドアロン プロジェクトとは異なり、ソリューションのバージョン番号は自動的にはインクリメントされません。--version パラメーターを使用してバージョンを明示的に指定する必要があります。
CI/CD の一般的なバージョン管理パターン
ほとんどのチームは、ビルドメタデータに基づいてバージョンを動的に生成します。
ビルド ID を使用する場合:
--version "1.0.$BUILD_ID"--version "1.0.$BUILD_ID"Git コミット SHA を使用する場合:
--version "2.1.${GIT_COMMIT_SHA:0:7}"--version "2.1.${GIT_COMMIT_SHA:0:7}"日付でセマンティック バージョニングを使用する:
--version "$(date +%Y.%m.$BUILD_NUMBER)"--version "$(date +%Y.%m.$BUILD_NUMBER)"バージョンの形式
バージョンはセマンティック バージョニングに従う必要があります。
- フォーマット:
MAJOR.MINOR.PATCH - 例:
1.0.0、2.3.45、10.20.1234 - ドットで区切った 3 つの数値コンポーネントのみを含む必要があります
パイプライン連携
Azure DevOps の例
- script: | uipcli solution pack $(Build.SourcesDirectory)\MySolution \ --output $(Build.ArtifactStagingDirectory) \ --version "1.0.$(Build.BuildId)" \ --traceLevel Information displayName: 'Pack Solution'- script: | uipcli solution pack $(Build.SourcesDirectory)\MySolution \ --output $(Build.ArtifactStagingDirectory) \ --version "1.0.$(Build.BuildId)" \ --traceLevel Information displayName: 'Pack Solution'GitHub Actions の例
- name: Pack Solution run: | uipcli solution pack ${{ github.workspace }}/MySolution \ --output ${{ runner.temp }}/packages \ --version "1.0.${{ github.run_number }}" \ --traceLevel Information- name: Pack Solution run: | uipcli solution pack ${{ github.workspace }}/MySolution \ --output ${{ runner.temp }}/packages \ --version "1.0.${{ github.run_number }}" \ --traceLevel Informationパッケージ化される内容
pack コマンドには以下がバンドルされています。
- ソリューションに含まれるすべてのプロジェクト
- プロジェクト レベルの依存関係
- ソリューションのメタデータと設定
- 環境固有の設定のバインド定義
生成される .zip ファイルは自己完結型で、Orchestrator にアップロードできます。
復元後のパッケージ化
最適な結果を得るには、pack前にrestoreを実行して、すべての依存関係が解決されていることを確認します。
# 1. Restore dependenciesuipcli solution restore C:\Solutions\MySolution \ --restoreFolder C:\Output\Dependencies \ --traceLevel Information# 2. Pack with explicit versionuipcli solution pack C:\Solutions\MySolution \ --output C:\Output \ --version 1.2.3 \ --traceLevel Verbose# 1. Restore dependenciesuipcli solution restore C:\Solutions\MySolution \ --restoreFolder C:\Output\Dependencies \ --traceLevel Information# 2. Pack with explicit versionuipcli solution pack C:\Solutions\MySolution \ --output C:\Output \ --version 1.2.3 \ --traceLevel Verboseパッケージの出力場所
パッケージ化された .zip ファイルは、 --outputで指定したディレクトリに配置されます。ディレクトリが存在しない場合は、自動的に作成されます。
一般的な出力パス
Azure DevOps:
--output $(Build.ArtifactStagingDirectory)--output $(Build.ArtifactStagingDirectory)GitHub Actions:
--output ${{ runner.temp }}/packages--output ${{ runner.temp }}/packagesジェンキンス:
--output ${WORKSPACE}/output--output ${WORKSPACE}/output次のステップ
梱包後、次のことができます。
- パッケージを ソリューション管理にアップロードします。
- ビルド成果物として CI/CD プラットフォームに保存してください。
- 成果物リポジトリ (Artifactory、Azure Artifacts など) でバージョン管理します。