serverless / serverless-google-cloudfunctions

Serverless Google Cloud Functions Plugin – Adds Google Cloud Functions support to the Serverless Framework
https://www.serverless.com
MIT License
272 stars 127 forks source link

feat: build environment variables #267

Open shekhirin opened 3 years ago

shekhirin commented 3 years ago

Google allows to update Build Environment Variables on deploy, so let's make use of such opportunity: https://cloud.google.com/functions/docs/env-var#updating_build_environment_variables.

buildEnvironmentVariables property is from REST API documentation https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions


Now we have a better solution for private Go dependencies than having a vendor. With build env vars, you can set GOPROXY and buildpack will fetch needed private dependencies through it. Yay.

shekhirin commented 2 years ago

Hi @medikoo! Could you please review the PR when you have a time?

pgrzesik commented 2 years ago

Hello @shekhirin - sorry for not getting into your Pr sooner - could you please rebase it on top of current master and request a review from me? Thanks :bow:

shekhirin commented 2 years ago

Hey @pgrzesik, just rebased! Seems like I don't have access to requesting a review 🤷‍♂️

and3rson commented 1 year ago

Just found this while looking for a way to set GOOGLE_FUNCTION_SOURCE which is critical for our deployment process and is the only thing blocking us from moving to GCP.

Any chance of getting this merged anytime soon? Thanks!

PrimeDominus commented 1 year ago

@shekhirin Maybe you need to rebase this to resolve conflicts?