Configuration lives in this directory. Emulator and cloud deploy use different Firebase config files because the local Firestore emulator does not support the multi-database firebase.json array format (firebase-tools#9742): it ignores rules and defaults to allowing all reads/writes.
| File | Purpose |
|---|---|
firebase.json |
Emulator + CI — single-database (default) Firestore config |
firebase.deploy.json |
Cloud deploy only — multi-database (default) + pipelines-e2e |
| Database | Rules file | Indexes file | Used by |
|---|---|---|---|
(default) |
firestore.rules |
firestore.indexes.json |
Standard Firestore e2e (emulator + cloud) |
pipelines-e2e |
firestore.pipelines-e2e.rules |
firestore.pipelines-e2e.indexes.json |
Pipeline.e2e.js (Enterprise cloud only) |
firebase.deploy.json uses the multi-database array format:
"firestore": [
{ "database": "(default)", "rules": "firestore.rules", "indexes": "firestore.indexes.json" },
{ "database": "pipelines-e2e", "rules": "firestore.pipelines-e2e.rules", "indexes": "firestore.pipelines-e2e.indexes.json" }
]firebase.json keeps the legacy single-object format required by the emulator:
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}cd .github/workflows/scripts
./sync-firestore-indexes.shOr manually:
firebase firestore:indexes --project react-native-firebase-testing --database "(default)" > firestore.indexes.json
firebase firestore:indexes --project react-native-firebase-testing --database pipelines-e2e > firestore.pipelines-e2e.indexes.jsonThere is no firebase firestore:rules pull command; edit the .rules files in-repo and deploy.
Canonical workflow (CLI ≥ 15.17.0 for search indexes): sync → edit JSON → ./deploy-firestore.sh (runs verify-firestore-indexes.sh) → sync again → confirm cloud pull matches intent. Full policy and tooling surfaces: okf-bundle Firebase testing project doc.
cd .github/workflows/scripts
./deploy-firestore.shUses firebase deploy --only firestore --config firebase.deploy.json (not firestore:indexes / firestore:rules sub-targets — those can silently no-op with multi-database config).
Vector indexes belong in firestore.pipelines-e2e.indexes.json under vectorConfig, not in security rules.
- Enterprise database on project
react-native-firebase-testing(locationeur3). - Pipeline Detox tests do not call
connectFirestoreEmulatorfor this database — they hit cloud. firestore.pipelines-e2e.rulesis intentionally permissive for shared CI/local testing.
Full context: okf-bundle Firebase testing project doc.