Skip to content

Commit 3c7d354

Browse files
feat: add Studio in-place update command (#695)
1 parent 31aaa93 commit 3c7d354

8 files changed

Lines changed: 1068 additions & 108 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@ VeADK provides several useful command line tools for faster deployment and optim
191191
Shanghai, and select the VeFaaS project with `--project` (default `default`);
192192
custom local or remote logo images are bundled into the deployment; the
193193
deployed client skips the second OAuth consent confirmation after login
194+
- `veadk studio update --vefaas-app-name <app-name>`: build the frontend from a
195+
local VeADK source checkout and release it through the existing VeFaaS
196+
Application and Function. Omit `--region` and `--project` to search Beijing,
197+
Shanghai, and all visible projects. Existing URL, SSO, IAM, gateway,
198+
environment variables, title, and logo are preserved; pass `--site-title` or
199+
`--site-logo` only when those branding values should be replaced
194200

195201
## Contribution
196202

‎docs/content/docs/framework/frontend.en.mdx‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,24 @@ then searches the Beijing and Shanghai Identity regions. A cross-region match
182182
emits a warning and continues. `--project` selects the VeFaaS function project
183183
and defaults to `default`.
184184

185+
To update an existing Studio deployment, run this command from a VeADK source
186+
checkout:
187+
188+
```bash
189+
veadk studio update --vefaas-app-name <app-name>
190+
```
191+
192+
The command rebuilds the local frontend, replaces the existing VeFaaS
193+
Function's code, and releases the original Application. When `--region` and
194+
`--project` are omitted, it searches Beijing, Shanghai, and all visible
195+
projects. If the Application name is ambiguous, it lists the candidates and
196+
requires a narrower scope. The update preserves the Application and Function
197+
IDs, URL, SSO, IAM, gateway, and existing environment variables. `--site-title`
198+
and `--site-logo` replace cloud branding only when explicitly provided;
199+
otherwise the current values are retained. Use `--path` to select a source
200+
checkout; it defaults to the current directory. Node.js and npm must be
201+
installed locally.
202+
185203
When deployment registers the callback URL, it keeps the VeIdentity login page
186204
enabled and enables skip-consent for that client. This avoids showing a second
187205
authorization confirmation after login.

‎docs/content/docs/framework/frontend.mdx‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,19 @@ veadk studio deploy \
167167
用户池;跨地域命中时会显示 warning 并继续。`--project` 指定 VeFaaS 函数
168168
所属项目,默认为 `default`。
169169

170+
更新已部署的 Studio 时,在 VeADK 源码目录执行:
171+
172+
```bash
173+
veadk studio update --vefaas-app-name <app-name>
174+
```
175+
176+
该命令重新构建本地前端并更新已有 VeFaaS Function 的代码,然后发布原
177+
Application。未指定 `--region` 和 `--project` 时,会在北京、上海以及所有可见
178+
项目中查找;若同名 Application 不唯一,命令会列出候选项并要求缩小范围。
179+
更新不会改变 Application/Function ID、访问 URL、SSO、IAM、网关或已有环境
180+
变量。`--site-title` 和 `--site-logo` 仅在显式传入时覆盖,省略时保留云上品牌
181+
设置。可用 `--path` 指定源码目录,默认为当前目录;本地需安装 Node.js 与 npm。
182+
170183
部署注册回调地址时会保留 VeIdentity 登录页,并为该客户端开启跳过授权确认,
171184
避免用户登录后再次确认授权。
172185

0 commit comments

Comments
 (0)