polymath
polymath copied to clipboard
Make managing deploying multiple endpoints easier
If you maintain only a single endpoint, it's easy: just put your libraries directly in libraries/
and put any other libraries you have access to that you want to be able to use locally but don't want to deploy in third_party
.
However, if you maintain multiple endpoints, it can be finicky to make sure the layout of your libraries
folder is updated for each deploy, and that you've set the right gcloud project
.
It could be something like a convention for your libraries
folder:
/endpoints
/gcp-project-id-1
library1.json
/gcp-project-id-2
/access
/unpublished
private-library2.json
And then a deploy script that goes through the libraries folder. for each sub-folder in libraries/endpoints
it sets the GCP project ID, twiddles some value (perhaps .gcloudignore, or moving directories around) to prevent the other things from being uploaded, and then uploads each one.