- 概述
- 开始使用
- 概念
- 使用 UiPath CLI
- 操作指南
- CI/CD 方法
- 命令参考
- 迁移
- 参考与支持
uip codedapp 部署
“uip codedapp部署”的语法和选项,用于在 UiPath 中部署或升级已发布的编码网页应用程序。
uip codedapp deploy用于在 UiPath 中部署或升级已发布的应用程序。当应用程序已部署后,该命令会将其就地升级;否则,它会检查路径名称是否空闲并部署应用程序。默认以最新发布的版本为目标;传递--version以固定特定内部版本。使用--folder-key或--folder-path选择目标文件夹。
大纲
uip codedapp deploy [options]
uip codedapp deploy [options]
选项
| 标记 | 描述 |
|---|---|
-n, --name <name> | 应用程序名称。以与pack中相同的方式转换为包 ID。如果省略,则使用保存在本地应用程序配置中的名称;在没有已保存名称的交互式终端中,命令会提示输入该名称。 |
--display-name <name> | UiPath 中显示的人类可读应用程序标题。如果省略,则使用在先前部署中记住的标题,然后输入--name 。在升级时,只有显式--display-name才会重命名已部署的应用程序。 |
--path-name <name> | URL 中的应用程序路径名 ( https://<org>.uipath.host/<path-name> )。默认为应用程序名称。升级时,仅当您传递此选项时,路径名称才会更改。要检查路径名称是否空闲,请运行uip codedapp validate --path-name 。 |
--client-id <id> | OAuth 客户端 ID 覆盖(非机密/公共客户端)。 |
-v, --version <version> | 以特定的已发布版本为目标。默认为最新发布的版本。 |
--tags <tags> | 已部署应用程序的逗号分隔分类标签,例如governance,insights。 |
--env-vars-file <path> | Publish the UIPATH_APPS_* variables in this .env file to the app. Other names in the file are skipped. When omitted, the deployed values are kept. Refer to Environment variables. |
--env <key=value> | A UIPATH_APPS_<NAME>=<value> pair to publish to the app, applied over --env-vars-file. Repeatable. |
--base-url <url> | UiPath 基本 URL(身份验证覆盖)。 |
--org-id <id> | 组织 ID(身份验证覆盖)。 |
--org-name <name> | 组织名称(身份验证覆盖)。 |
--tenant-id <id> | 租户 ID(身份验证覆盖)。 |
--folder-key <key> | 要部署的文件夹键。请参阅文件夹选择。 |
--folder-path <path> | 要部署到的文件夹,按路径(例如Finance/Invoicing )或显示名称(当名称唯一时)。解析为文件夹键。不能与--folder-key结合使用。请参阅文件夹选择。 |
--access-token <token> | 访问令牌(身份验证覆盖)。 |
选择文件夹
按此顺序解析目标文件夹:
-
--folder-keyor--folder-path, when passed. If the app was published into your Personal Workspace, a shared folder is refused; if it was published into the tenant feed, a Personal Workspace folder is refused. A folder that reads from a different package feed is covered under Feed mismatch in Failure modes. Passing both options fails. -
UIPATH_FOLDER_KEY环境变量。当您传递--folder-path时,系统会忽略该参数。 -
The folders available to your account, filtered to match the feed the app was published into:
- Personal Workspace feed. Personal Workspace folders.
- Tenant feed. Shared folders that read from the tenant feed. A folder that has its own package feed is not listed.
--folder-keyand--folder-pathstill accept it for an upgrade of an app already deployed there. - Folder feed. Folders that read from that feed.
When exactly one folder matches, it is selected automatically. When several match, an interactive terminal shows a picker; a non-interactive run fails and asks for
--folder-key. Runuip or folders list --output jsonto find a folder key.
环境变量
--env-vars-file and --env set the environment variables of the deployed app. The Apps service publishes them to the app, on a fresh deploy and on an upgrade.
The values are public to anyone who can open the app. Do not pass secrets.
| 输入 | 结果 |
|---|---|
| Neither option | Nothing is sent, and the deployed values are kept. |
A name in the file without the UIPATH_APPS_ prefix | Skipped, and listed on stderr. |
An --env name without the UIPATH_APPS_ prefix | The deploy fails before any request. |
| An empty file | The deployed values are cleared. |
| A file that holds only comments, or only names without the prefix | The deploy fails instead of clearing the values. |
A line that is not NAME=value | The deploy fails and names the line. |
An unquoted value that contains # | The deploy fails, because .env reads an unquoted # as the start of a comment. Quote the value: UIPATH_APPS_COLOR="#0f2f27". A comment after a space (NAME=value # note) is accepted. |
| A value with a line break | The deploy fails and names the variable. |
These failures return ErrorCode: "invalid_argument". Error messages name the variable and never print its value.
The tenant must have environment variables enabled for coded apps. Otherwise, the Apps service refuses the deploy.
uip codedapp push adds the UIPATH_APPS_* names of the project's .env.example file to the app in its Studio Web solution.
示例
# Deploy / upgrade to the latest published version
uip codedapp deploy --name "MyApp"
# Pin a specific version
uip codedapp deploy --name "MyApp" --version "1.0.0"
# Deploy into a folder
uip codedapp deploy --name "MyApp" \
--folder-key f0f0f0f0-0000-0000-0000-000000000001
# Deploy into a folder by path
uip codedapp deploy --name "MyApp" --folder-path "Finance/Invoicing"
# Publish environment variables from a file, and override one of them
uip codedapp deploy --name "MyApp" --env-vars-file .env.production \
--env UIPATH_APPS_REGION=EU
# Separate display title, a custom OAuth client, and system tags
uip codedapp deploy --name "my-app" --display-name "My App" \
--client-id "my-oauth-client-id" --tags governance
# Deploy / upgrade to the latest published version
uip codedapp deploy --name "MyApp"
# Pin a specific version
uip codedapp deploy --name "MyApp" --version "1.0.0"
# Deploy into a folder
uip codedapp deploy --name "MyApp" \
--folder-key f0f0f0f0-0000-0000-0000-000000000001
# Deploy into a folder by path
uip codedapp deploy --name "MyApp" --folder-path "Finance/Invoicing"
# Publish environment variables from a file, and override one of them
uip codedapp deploy --name "MyApp" --env-vars-file .env.production \
--env UIPATH_APPS_REGION=EU
# Separate display title, a custom OAuth client, and system tags
uip codedapp deploy --name "my-app" --display-name "My App" \
--client-id "my-oauth-client-id" --tags governance
数据形状(--输出 json)
{
"Code": "DeployCompleted",
"Data": { "message": "App deployed successfully." }
}
{
"Code": "DeployCompleted",
"Data": { "message": "App deployed successfully." }
}
失败的部署返回带有Result: "Failure"的Message: "Deploy failed" ,并在Instructions中返回原因。
故障模式
- 没有 Apps 作用域的外部应用程序令牌。当您使用令牌没有 Apps 作用域的外部应用程序(客户端凭据)登录时,UiPath Apps 服务会拒绝该请求。命令失败,并显示
ErrorCode: "permission_denied"和一条消息,命名Apps.Read和Apps.Write作用域。将两个作用域都授予外部应用程序,将其添加到uip login --scope中,然后再次登录。 - 路径名称已被占用。当该路径名称在组织中正在使用时,全新部署将失败。传递不同的
--path-name。 - 文件夹为必填项。(包含多个候选文件夹且没有
--folder-key、--folder-path或UIPATH_FOLDER_KEY的非交互式运行将失败。 - Feed mismatch. A fresh deploy into a folder that reads packages from a different feed than the one the app was published into fails with a message that starts with
Folder <folder-key> has its own package feed. An upgrade of an app already deployed there prints the message as a warning and proceeds. Publish the package into that folder's feed withuip codedapp publish --folder-key <folder-key>, then deploy. The package published into the folder's feed is registered as a separate app. See Deploying into a folder that has its own feed. - Same package name in two feeds. This applies only when the folder already runs the app from one feed and you deploy the same package name published into another feed. The command fails with a message that contains
This folder already has a deployed app named. Remove the existing app from the folder, then deploy. See Moving a deployed app to the folder feed. - 应用程序未发布。如果未找到应用程序(或您传递的
--version)的已发布版本,则该命令将失败。请先运行uip codedapp publish。
相关内容
- uip codedapp publish — 发布
deploy激活的包。 - uip codedapp pack — 生成
.nupkg使用的publish。