0

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?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Batato
  • 560
  • 5
  • 18

1 Answers1

1

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.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441