- 概述
- 开始使用
- 概念
- 使用 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-key--folder-path若传递)。如果应用程序发布到您的个人工作区,系统会拒绝共享文件夹;如果已发布到租户订阅源,则拒绝个人工作区文件夹。这两个选项都无法通过。 UIPATH_FOLDER_KEY环境变量。当您传递--folder-path时,系统会忽略该参数。- 您帐户可用的文件夹,按个人工作区或共享文件夹进行筛选,以匹配应用程序的发布方式。当只有一个文件夹匹配时,系统会自动选择该文件夹。当多个匹配项匹配时,交互式终端会显示一个选取器;非交互式运行失败,并要求提供
--folder-key。运行uip or folders list --output json以查找文件夹密钥。
环境变量
--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的非交互式运行将失败。 - 订阅源不匹配。部署到文件夹时,该文件夹从与应用程序发布到的订阅源不同的订阅源中读取包,并显示以
Folder <folder-key> has its own package feed开头的消息。使用uip codedapp publish --folder-key <folder-key>将包发布到该文件夹的订阅源中,然后部署。发布到文件夹订阅源中的包将注册为单独的应用程序。请参阅部署到具有自己订阅源的文件夹中。 - 应用程序未发布。如果未找到应用程序(或您传递的
--version)的已发布版本,则该命令将失败。请先运行uip codedapp publish。
相关内容
- uip codedapp publish — 发布
deploy激活的包。 - uip codedapp pack — 生成
.nupkg使用的publish。