Open2
firebase-toolsによるextensionsの管理
最新の Firebase CLI では、extensionsの管理ができる。
具体的には、 firebase.json
に以下のように記載する。
{
// ...
"extensions": {
"my-bigquery-extension": "firebase/firestore-bigquery-export@^0.1.18",
"my-image-resizer": "firebase/storage-resize-images@^0.1.22",
}
}
また、JSON上のキーと同一のファイルを extensions
ディレクトリに格納する。
例: extensions/my-image-resizer.env
IMAGE_TYPE=jpeg
LOCATION=us-central1
IMG_BUCKET=${param:PROJECT_ID}.appspot.com
IMG_SIZES=100x100
DELETE_ORIGINAL_FILE=false
これにより、 firebase deploy --only extensions
で Firebase Extensions をデプロイできる。
つまり、コードでExtensionsを冪等に保つことができる。
関連のリリース履歴
- v9.23.2
- Fixes issue when installing a Firebase Extension where secrets would be created before validation.
- v9.23.0
-
firebase deploy --only extensions
now supports project specifc .env files. When deploying to multiple projects, param values that are different between projects can be put inextensions/${extensionInstanceId}.env.${projectIdOrAlias}
and common param values can be put inextensions/${extensionInstanceId}.env
.
-
- v9.22.0
- Adds
firebase ext:export
command, and addsextensions
tofirebase deploy
. See https://firebase.google.com/docs/extensions/reuse-project-config for more infomation on how to manage your extensions with these commands.
- Adds
- v9.15.0
- Fixes a number of issues where
ext:dev:emulator:*
was not providing the correct parameter values to the emulated extension (#2928)
- Fixes a number of issues where
- v9.13.1
- Fixes an issue with ext:update where local extension is incorrectly inferred as published (#3499)
- 続く