Deploy functions automatically
Is there a way to deploy just the index.js (or the entry point index) file and have the emulator automatically deploy all exports within it? As opposed to specifically deploying one function at a time?
@Alex-Mann , the deploy strategies are a bit unclear to me to. Not a emulator issue, but a general issue of how to deploy and maintain functions. Would @jmdobry be able to give some guidelines on that. The documentation have lots of single function deploy samples. But how manageable would 25 functions with all the sub libraries be? Deployment will take LONG, hence my keen interest on the this emulator, as it would save 90% of the time to "trial and error"
This is a good question. In order for the Emulator (or the Gcloud CLI for that matter) to deploy a directory's index.js file and all its exported functions, it would have to load the file via require and parse the exported functions. At that point it would know the names of the functions, but it wouldn't know anything else, e.g. trigger type, timeout, etc.
It seems I'd have to devise a way for you to statically declare the functions' trigger types to be read at deploy time. Probably need to loop @jasonpolites in on this one.
fyi: Cloud Functions for Firebase solves this by requiring you to wrap your function definitions with their firebase-functions SDK, so your settings are stored in your code.
Hi there,
any update on this issue? It would be pretty useful for setting up deploys from our CI/CD servers
Maybe out of scope of this issue, but why don't unify SDKs with Firebase? They have the feature already 🤔