Batato
Batato

Reputation: 568

Perform action on Google Cloud Function install/setup

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

Answers (1)

Doug Stevenson
Doug Stevenson

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

Related Questions