Reputation: 568
I'm writing a cloud function that process a pub/sub message which contains a grpc message. I would like, at install/(re)deploy time, the cloud function to perform some action: pull the protobuf definition from some GitHub repository and generate the correspondent python code with grpcio-tools, roughly in the same line of this.
So far I can only find in the documentation how to add dependencies, however I'm looking for some sort of on install "hook": something that would allow me to perform some actions before the function is actually deployed.
Is this possible? Any advice?
Upvotes: 0
Views: 107
Reputation: 317928
Cloud Functions has no such hook. You can perform the work in a script on the machine that performs the deployment. It's not uncommon to write scripts to automate work like this.
Upvotes: 1