I’m trying to add the needed roles for a CI pipeline to automatically deploy to firebase (by running firebase deploy
.
The roles I’ve added so far are:
- API Keys viewer
- Artifact registry writer
- Cloud build Service Account
- Cloud Functions Admin
- Cloud Run Viewer
- Firebase App distribution admin
- Firebase Authentication admin
- firebase hosting admin
- firebase rules admin
- service account user
- service usage admin
Honnestly at this point I’m just adding what sounds good, as the error message is not helpful:
There was an issue deploying your functions. Verify that your project
has a Google App Engine instance setup at
https://console.cloud.google.com/appengine and try again. If this
issue persists, please contact support.
It works when adding the Owner permission, so this is a permission issue.
2
Answers
For deploying the hosting app IAM role must be either an Owner or Editor. Sometimes updating the latest version of a Node Package/Firebase tool will resolve the issue as per my experience.
It will provide the globally accessible firebase command.
For reference: https://firebase.google.com/docs/projects/iam/roles
For any deployments, you need the first Firebase token which is GCP_SA_key for whatever you want to deploy or update.
There are different scenarios let me elaborate with reference
You need more roles for Updating Firestore to update rules, indexes, and files.
Further details reference added :GitHub Integration/deployments roles
As you want to deploy the entire project, the most applicable role would be Firebase Admin.
I use it in portuguese, so the translation in english may be different.