build/cloudfns/issueswebhook
Dmitri Shuralyov ef3d1880f2 cloudfns: fetch secrets from Secret Manager
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>
2021-03-18 16:09:22 +00:00
..
README.md cloudfns: fetch secrets from Secret Manager 2021-03-18 16:09:22 +00:00
go.mod cloudfns: update to go1.13 runtime 2020-04-28 20:27:02 +00:00
go.sum cloudfns: add issueswebhook to store issue events in GCS 2019-10-10 20:44:41 +00:00
issueswebhook.go cloudfns: add issueswebhook to store issue events in GCS 2019-10-10 20:44:41 +00:00
issueswebhook_test.go cloudfns: add issueswebhook to store issue events in GCS 2019-10-10 20:44:41 +00:00

README.md

Go Reference

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)"