- 概要
- UiPath CLI
- Azure DevOps 拡張機能
- Jenkins プラグイン
ソリューション パッケージをターゲット フォルダーにデプロイし、Orchestrator でアクティブ化します。
ソリューション パッケージをソリューションにアップロードしたら、ターゲット フォルダーにデプロイし、アクティブ化して動作させることができます。
プライベート証明機関 (UiPath Automation Suite など) によって署名された Orchestrator インスタンスの場合、 deploy と deploy-activate の両方で --ca-cert パラメーターと --pinnedpubkey パラメーターも使用できます。シナリオと例については、「 カスタム証明書を信頼する 」をご覧ください。
デプロイ ワークフロー
ソリューションのデプロイは、次の 2 段階のプロセスです。
- デプロイ: デプロイ構成を作成し、パッケージをターゲット フォルダーに関連付けます。
- アクティブ化: デプロイを稼働させ、運用可能にします。
この分離により、デプロイを事前に準備し、メンテナンス ウィンドウ中または手動承認後にアクティブ化できます。
ソリューションをデプロイする
deploy コマンドは、特定の環境にソリューション パッケージのデプロイを作成します。
コマンド構文
uipcli solution deploy <package-name> [options]
uipcli solution deploy <package-name> [options]
パラメーター
| パラメーター | 説明 | Required |
|---|---|---|
<package-name> | アップロードされたパッケージの名前 | はい |
-v OR --version | デプロイするパッケージ バージョン | はい |
-d OR --deploymentName | このデプロイの名前 | はい |
-f OR --deploymentFolderName | Orchestrator でのターゲット フォルダー名 | はい |
-U | Orchestrator URL | はい |
-T | テナント名 | はい |
-A | 組織名 | はい |
-I | 外部アプリ ID | はい |
-S | 外部アプリケーション シークレット | はい |
--applicationScope | 任意のスコープ (既定値が適用されます) | いいえ |
--deploymentParentFolder | デプロイ フォルダーが作成される Orchestrator のフォルダーです。指定しない場合、デプロイ フォルダーはテナント フォルダー内に作成されます。指定した場合、デプロイはそれぞれのフォルダーの下に配置されます。「exampleuser@org.com に設定すると、ワークスペース」の場合、デプロイは指定したユーザーの個人用ワークスペースの下に配置されます。 | いいえ |
--configPath | ソリューション構成ファイルへのローカル パス上書きバインドを使用するシナリオで必要です。構成ファイルの取得について詳しくは、「 ソリューション パッケージと構成をダウンロードする 」をご覧ください。 | いいえ |
--traceLevel | ログ レベル | いいえ |
--ca-cert | Orchestrator/Identity TLS 証明書の信頼されたルート CA ファイル (PEM、DER、または PKCS#7)。繰り返すか、コンマで区切ります。「カスタム証明書を信頼する」をご覧ください。 | いいえ |
--pinnedpubkey | リーフの公開鍵 (sha256//<base64>をピン留めします。「カスタム証明書を信頼する」をご覧ください。 | いいえ |
ソリューションの既定のアプリケーション スコープ
--applicationScope パラメーターを指定せずに外部アプリケーション認証を使用すると、CLI は次の既定のソリューション スコープを自動的に適用します。
Solutions.Packages Solutions.Deployments OR.Execution
大事な: 3 つのスコープはすべて、ソリューション関連のすべての CLI コマンドに必要です。これらのスコープは、利用可能なすべてのソリューション コマンドを包括的にカバーするためにグループ化されています。コマンドごとに個別に設定するのではなく、まとめて設定する必要があります。
Orchestrator のテナント内の任意のレベルで同じ名前のデプロイがすでに存在する場合、この操作により、新しいデプロイが作成されるのではなく、既存のデプロイがアップグレードされます。既存のデプロイが [失敗] ステートの場合、アップグレードは続行されません。失敗したデプロイを解決するかアンインストールしてから、再試行してください。
テナント レベルでデプロイされたソリューションでは、生成されるフォルダーにユーザーが自動的に割り当てられることはありません。アカウントを割り当てるには、Orchestrator (テナント > フォルダー) で適切な設定が行われていることを確認します。
認証
必要なスコープについては、「 認証とスコープ 」および「外部アプリの設定」をご覧ください。
例
uipcli solution deploy MySolution \
-v 1.2.3 \
-d MySolution-Prod-v1.2.3 \
-f Production \
-U https://cloud.uipath.com/ \
-T DefaultTenant \
-A myorg \
-I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-S **** \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
--traceLevel Information
uipcli solution deploy MySolution \
-v 1.2.3 \
-d MySolution-Prod-v1.2.3 \
-f Production \
-U https://cloud.uipath.com/ \
-T DefaultTenant \
-A myorg \
-I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-S **** \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
--traceLevel Information
デプロイの命名規則
以下を含む意味のあるデプロイ名を選択します。
- ソリューション名
- 環境識別子
- バージョンまたは日付
例
MySolution-Dev-v1.2.3
MySolution-Test-2025-01-15
MySolution-Prod-Release-1.2.3
InvoiceProcessing-Production-v2.0.0
MySolution-Dev-v1.2.3
MySolution-Test-2025-01-15
MySolution-Prod-Release-1.2.3
InvoiceProcessing-Production-v2.0.0
これにより、複数の環境にわたるデプロイの追跡と管理が容易になります。
デプロイ中の処理
deploy コマンドを実行すると、以下の操作が実行されます。
- パッケージが [ソリューション] で検証されている。
- デプロイ設定が作成されます。
- デプロイはターゲット フォルダーに関連付けられます。
- 環境固有のバインドが初期化されます。
- デプロイの準備は整っていますが、まだアクティブになっていません。
ソリューションは、アクティブ化するまでプロセスの実行を開始しません。
Reusing existing resources
By default, deploying a Solution provisions every resource in the target folder. When the target environment already contains a resource you want to reuse, such as a shared connection to an external system, link the Solution's resource to the existing one through the deployment configuration file, then deploy with --configPath.
This is the pipeline equivalent of choosing Customize and linking a resource by hand when you deploy a Solution manually in Orchestrator.
Linking a resource that lives in an Orchestrator folder requires the OR.Folders and RCS.FolderAuthorization scopes, and the External Application must be assigned to the folder that holds the existing resource.
手順
-
Download the deployment configuration for the package. See Downloading Solution Packages and Configs.
uipcli solution download-config MySolution \ -d C:\Configs \ -v 1.0.0 \ --format json \ -U https://cloud.uipath.com/ \ -T DefaultTenant \ -A myorg \ -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ -S **** \ --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Packages OR.Folders RCS.FolderAuthorization"uipcli solution download-config MySolution \ -d C:\Configs \ -v 1.0.0 \ --format json \ -U https://cloud.uipath.com/ \ -T DefaultTenant \ -A myorg \ -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ -S **** \ --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Packages OR.Folders RCS.FolderAuthorization" -
Open the downloaded configuration file.
-
Locate the entry for the resource you want to reuse.
-
Add a
linkToResourceblock that points the entry at the existing Orchestrator resource by name and folder. For a connection resource, the entry looks like this:{ "kind": "connection", "name": "Slack connection", "resourceKey": "b060048b-4be3-425e-9822-9139605ba2a7", "folderPaths": [ "solution_folder" ], "configuration": { "description": null, "authenticationType": "AuthenticateAfterDeployment", "connectorVersion": "2.14.7", "connectorKey": "uipath-salesforce-slack", "pollingInterval": 5 }, "linkToResource": { "name": "Existing Slack connection", "folderPath": "Shared" } }{ "kind": "connection", "name": "Slack connection", "resourceKey": "b060048b-4be3-425e-9822-9139605ba2a7", "folderPaths": [ "solution_folder" ], "configuration": { "description": null, "authenticationType": "AuthenticateAfterDeployment", "connectorVersion": "2.14.7", "connectorKey": "uipath-salesforce-slack", "pollingInterval": 5 }, "linkToResource": { "name": "Existing Slack connection", "folderPath": "Shared" } }The
linkToResourceobject points the Solution's resource at the existing one; the fields underconfigurationvary by resource type. -
Deploy the Solution, passing the edited configuration with
--configPath.uipcli solution deploy MySolution \ -v 1.0.0 \ -d MySolution-Prod-v1.0.0 \ -f Production \ --deploymentParentFolder "Shared" \ --configPath C:\Configs\MySolution.1.0.0.json \ -U https://cloud.uipath.com/ \ -T DefaultTenant \ -A myorg \ -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ -S **** \ --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Packages OR.Folders RCS.FolderAuthorization"uipcli solution deploy MySolution \ -v 1.0.0 \ -d MySolution-Prod-v1.0.0 \ -f Production \ --deploymentParentFolder "Shared" \ --configPath C:\Configs\MySolution.1.0.0.json \ -U https://cloud.uipath.com/ \ -T DefaultTenant \ -A myorg \ -I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ -S **** \ --applicationScope "AutomationSolutions Solutions.Deployments Solutions.Packages OR.Folders RCS.FolderAuthorization"
The deployment reuses the linked resource instead of creating a new one in the target folder.
Connection authentication
For connection resources, linking an existing connection is one option among several. The authenticationType field in the configuration file accepts two values: ConfigurableByUsers and AuthenticateAfterDeployment.
Set authenticationType to ConfigurableByUsers to leave the connection unbound and defer its selection to execution time. Users select and authenticate the connection when the automation runs, which is also a valid configuration for activation.
With AuthenticateAfterDeployment, the connection must be authenticated after the deployment completes. If it is not authenticated by the time activation runs, the activation is reported as failed.
デプロイをアクティブ化する
deploy-activate コマンドを使用すると、デプロイがライブかつ運用可能になります。
コマンド構文
uipcli solution deploy-activate <deployment-name> [options]
uipcli solution deploy-activate <deployment-name> [options]
パラメーター
| パラメーター | 説明 | Required |
|---|---|---|
<deployment-name> | アクティブ化するデプロイの名前です | はい |
-U | Orchestrator URL | はい |
-T | テナント名 | はい |
-A | 組織名 | はい |
-I | 外部アプリ ID | はい |
-S | 外部アプリケーション シークレット | はい |
--applicationScope | 必要なスコープ | はい |
--traceLevel | ログ レベル | いいえ |
--ca-cert | Orchestrator/Identity TLS 証明書の信頼されたルート CA ファイル (PEM、DER、または PKCS#7)。繰り返すか、コンマで区切ります。「カスタム証明書を信頼する」をご覧ください。 | いいえ |
--pinnedpubkey | リーフの公開鍵 (sha256//<base64>をピン留めします。「カスタム証明書を信頼する」をご覧ください。 | いいえ |
認証
必要なスコープについては、「 認証とスコープ 」および「外部アプリの設定」をご覧ください。
例
uipcli solution deploy-activate MySolution-Prod-v1.2.3 \
-U https://cloud.uipath.com/ \
-T DefaultTenant \
-A myorg \
-I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-S **** \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
--traceLevel Information
uipcli solution deploy-activate MySolution-Prod-v1.2.3 \
-U https://cloud.uipath.com/ \
-T DefaultTenant \
-A myorg \
-I 12345678-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-S **** \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write" \
--traceLevel Information
アクティベーション中の処理
デプロイをアクティブ化すると、以下の処理が行われます。
- デプロイがターゲット フォルダー内のアクティブなバージョンになります。
- トリガーがアクティブになります。
- 同じフォルダー内に以前にアクティブだったデプロイは非アクティブ化されます。
CI/CD パイプラインの統合
完全なデプロイ ワークフロー
steps:
# 1. Pack the Solution
- name: Pack Solution
run: |
uipcli solution pack ./MySolution \
--output ./packages \
--version "1.0.${{ github.run_number }}"
# 2. Upload to Solutions Management
- name: Upload Package
run: |
uipcli solution upload-package ./packages/MySolution.1.0.${{ github.run_number }}.zip \
-U ${{ secrets.ORCHESTRATOR_URL }} \
-T ${{ secrets.ORCHESTRATOR_TENANT }} \
-A ${{ secrets.ORG_NAME }} \
-I ${{ secrets.EXTERNAL_APP_ID }} \
-S ${{ secrets.EXTERNAL_APP_SECRET }} \
--applicationScope "AutomationSolutions Solutions.Packages Solutions.Packages.Write"
# 3. Deploy to target environment
- name: Deploy Solution
run: |
uipcli solution deploy MySolution \
-v "1.0.${{ github.run_number }}" \
-d "MySolution-Prod-v1.0.${{ github.run_number }}" \
-f Production \
-U ${{ secrets.ORCHESTRATOR_URL }} \
-T ${{ secrets.ORCHESTRATOR_TENANT }} \
-A ${{ secrets.ORG_NAME }} \
-I ${{ secrets.EXTERNAL_APP_ID }} \
-S ${{ secrets.EXTERNAL_APP_SECRET }} \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write"
# 4. Activate the deployment
- name: Activate Deployment
run: |
uipcli solution deploy-activate "MySolution-Prod-v1.0.${{ github.run_number }}" \
-U ${{ secrets.ORCHESTRATOR_URL }} \
-T ${{ secrets.ORCHESTRATOR_TENANT }} \
-A ${{ secrets.ORG_NAME }} \
-I ${{ secrets.EXTERNAL_APP_ID }} \
-S ${{ secrets.EXTERNAL_APP_SECRET }} \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write"
steps:
# 1. Pack the Solution
- name: Pack Solution
run: |
uipcli solution pack ./MySolution \
--output ./packages \
--version "1.0.${{ github.run_number }}"
# 2. Upload to Solutions Management
- name: Upload Package
run: |
uipcli solution upload-package ./packages/MySolution.1.0.${{ github.run_number }}.zip \
-U ${{ secrets.ORCHESTRATOR_URL }} \
-T ${{ secrets.ORCHESTRATOR_TENANT }} \
-A ${{ secrets.ORG_NAME }} \
-I ${{ secrets.EXTERNAL_APP_ID }} \
-S ${{ secrets.EXTERNAL_APP_SECRET }} \
--applicationScope "AutomationSolutions Solutions.Packages Solutions.Packages.Write"
# 3. Deploy to target environment
- name: Deploy Solution
run: |
uipcli solution deploy MySolution \
-v "1.0.${{ github.run_number }}" \
-d "MySolution-Prod-v1.0.${{ github.run_number }}" \
-f Production \
-U ${{ secrets.ORCHESTRATOR_URL }} \
-T ${{ secrets.ORCHESTRATOR_TENANT }} \
-A ${{ secrets.ORG_NAME }} \
-I ${{ secrets.EXTERNAL_APP_ID }} \
-S ${{ secrets.EXTERNAL_APP_SECRET }} \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write"
# 4. Activate the deployment
- name: Activate Deployment
run: |
uipcli solution deploy-activate "MySolution-Prod-v1.0.${{ github.run_number }}" \
-U ${{ secrets.ORCHESTRATOR_URL }} \
-T ${{ secrets.ORCHESTRATOR_TENANT }} \
-A ${{ secrets.ORG_NAME }} \
-I ${{ secrets.EXTERNAL_APP_ID }} \
-S ${{ secrets.EXTERNAL_APP_SECRET }} \
--applicationScope "AutomationSolutions Solutions.Deployments Solutions.Deployments.Read Solutions.Deployments.Write Solutions.Packages Solutions.Packages.Read Solutions.Packages.Write"
手動承認によるゲート デプロイ
デプロイ ステップとアクティブ化ステップを分離して、承認ワークフローを実装できます。
# Stage 1: Deploy (automated)
- stage: DeployToProduction
jobs:
- job: Deploy
steps:
- script: |
uipcli solution deploy MySolution -v $(version) -d MySolution-Prod-$(version) -f Production ...
displayName: 'Prepare Production Deployment'
# Stage 2: Activate (requires approval)
- stage: ActivateProduction
dependsOn: DeployToProduction
# Manual approval gate configured in Azure DevOps
jobs:
- deployment: Activate
environment: 'Production'
steps:
- script: |
uipcli solution deploy-activate MySolution-Prod-$(version) ...
displayName: 'Activate Production Deployment'
# Stage 1: Deploy (automated)
- stage: DeployToProduction
jobs:
- job: Deploy
steps:
- script: |
uipcli solution deploy MySolution -v $(version) -d MySolution-Prod-$(version) -f Production ...
displayName: 'Prepare Production Deployment'
# Stage 2: Activate (requires approval)
- stage: ActivateProduction
dependsOn: DeployToProduction
# Manual approval gate configured in Azure DevOps
jobs:
- deployment: Activate
environment: 'Production'
steps:
- script: |
uipcli solution deploy-activate MySolution-Prod-$(version) ...
displayName: 'Activate Production Deployment'
マルチ環境の推進
同じバージョンを複数の環境に順番にデプロイします。
# Deploy to Dev
uipcli solution deploy MySolution -v 1.2.3 -d MySolution-Dev-1.2.3 -f Dev ...
uipcli solution deploy-activate MySolution-Dev-1.2.3 ...
# Deploy to Test
uipcli solution deploy MySolution -v 1.2.3 -d MySolution-Test-1.2.3 -f Test ...
uipcli solution deploy-activate MySolution-Test-1.2.3 ...
# Deploy to Production (after approval)
uipcli solution deploy MySolution -v 1.2.3 -d MySolution-Prod-1.2.3 -f Production ...
uipcli solution deploy-activate MySolution-Prod-1.2.3 ...
# Deploy to Dev
uipcli solution deploy MySolution -v 1.2.3 -d MySolution-Dev-1.2.3 -f Dev ...
uipcli solution deploy-activate MySolution-Dev-1.2.3 ...
# Deploy to Test
uipcli solution deploy MySolution -v 1.2.3 -d MySolution-Test-1.2.3 -f Test ...
uipcli solution deploy-activate MySolution-Test-1.2.3 ...
# Deploy to Production (after approval)
uipcli solution deploy MySolution -v 1.2.3 -d MySolution-Prod-1.2.3 -f Production ...
uipcli solution deploy-activate MySolution-Prod-1.2.3 ...
ロールバック戦略
以前のバージョンにロールバックするには、以下の手順を実行します。
- 以前のバージョンを新しいデプロイ名でデプロイします。
- 以前のバージョンのデプロイをアクティブ化します。
- 必要に応じて、新しいデプロイをアンインストールします。
# Roll back to v1.2.2
uipcli solution deploy MySolution -v 1.2.2 -d MySolution-Prod-Rollback-1.2.2 -f Production ...
uipcli solution deploy-activate MySolution-Prod-Rollback-1.2.2 ...
# Roll back to v1.2.2
uipcli solution deploy MySolution -v 1.2.2 -d MySolution-Prod-Rollback-1.2.2 -f Production ...
uipcli solution deploy-activate MySolution-Prod-Rollback-1.2.2 ...
次のステップ
ソリューションをデプロイしてアクティブ化したら、以下を行うことができます。
- Orchestrator で実行を監視します。
- 不要になったデプロイをアンインストール します。
- 同じワークフローに従って新しいバージョンをデプロイします。