How to include commit number in description/environment when deploying a cloud function?

We can deploy Google Cloud functions as follows:

gcloud functions deploy NAME --entry-point NAME --runtime RUNTIME TRIGGER [FLAGS...] 

Now, I would like to better keep track of which commit I am in when deploying.

Is there a way to automatically fetch the current branch + latest commit number (e.g. e5de21d) and attach it to the deployment?

Add Comment
1 Answer(s)

You could probably set this data as labels in order to keep track of them

Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.