manifest render
输出应用 manifest,并替换其中的声明的变量。
使用
选项
-v, --verbose enable verbose mode
--json output results in JSON format (default: false)
-h, --help display help for command声明变量
在 manifest.yaml 的字符串中可以用 ${NAME} 引用环境变量, ${NAME ?? "默认值"} 可指定默认值,默认值在变量未设置时生效。
app:
id: demo-app
name: ${APP_NAME ?? "Demo"}
remotes:
- key: api
baseUrl: ${API_BASE_URL}/v1示例
渲染当前应用的 manifest,默认输出 YAML
nexus manifest render以 JSON 格式输出
nexus manifest render --json为占位符提供环境变量。 manifest.yaml 中包含 APP_NAME 和 API_BASE_URL 时:
APP_NAME=Demo nexus manifest render