【发布时间】:2021-09-15 13:33:18
【问题描述】:
我目前正在使用 AWS Amplify 来管理我的前端。我一直在整个控制台中手动注入环境变量。
虽然我已经看到(至少在这种情况下),但环境变量得到了正确的保护,如 AWS docs 中所述。我想知道是否可以在每个分支的amplify.yml 文件变量中设置不一定需要保护的变量。
类似这样的:
version: 0.1
env:
variables:
myvarOne:
branch: master
value: ad
branch: dev
value otherval
frontend:
phases:
preBuild:
commands:
- yarn install
- yarn lint
- yarn test
build:
commands:
- yarn build build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
【问题讨论】:
标签: amazon-web-services environment-variables aws-amplify