зеркало из https://github.com/golang/build.git
ef3d1880f2
This makes the deploy into something that can be executed without the need to seek external context on where the secrets are kept. It's especially helpful since we deploy cloud functions less frequently than many other services. A future change can explore removing secrets from the environment, preferring to have the cloud function access secrets directly from Secret Manager. Updates golang/go#37171. Change-Id: I1b1468c6f02d45b764f65396027d9bdca69ac5e4 Reviewed-on: https://go-review.googlesource.com/c/build/+/300230 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org> |
||
---|---|---|
.. | ||
README.md | ||
go.mod | ||
go.sum | ||
issueswebhook.go | ||
issueswebhook_test.go |
README.md
golang.org/x/build/cloudfns/issueswebhook
Package issueswebhook implements a Google Cloud Function HTTP handler that expects GitHub webhook change events.
Deploying
gcloud functions deploy GitHubIssueChangeWebHook \
--project=symbolic-datum-552 \
--runtime go113 \
--trigger-http \
--set-env-vars="GCS_BUCKET=golang-github-issue-data,GITHUB_WEBHOOK_SECRET=$(gcloud --project=symbolic-datum-552 secrets versions access latest --secret=github-webhook-secret)"