[buildbucket] Publish to the external topic

1. add a new `topic` field  in NotifyPubSubGo task proto to indicate
that it should be publish to an external or internal topic.

2. Add code in NotifyPubSubGo task handler to make it be able to publish msg to a given external topic.

3. Extract ValidatePubSubTopicName func to pubsub.go so it can be
 reused.

Bug:1381210
Change-Id: I2e66fdd437c98cf5a6e92163f4a7e3c8f79b32eb
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/4086906
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
9 files changed
tree: 4b640cceb491d5a9918671618fc36e783a3f676e
  1. analysis/
  2. appengine/
  3. auth/
  4. auth_service/
  5. bisection/
  6. build/
  7. buildbucket/
  8. casviewer/
  9. cipd/
  10. client/
  11. cmdrunner/
  12. common/
  13. config/
  14. cv/
  15. deploy/
  16. examples/
  17. gae/
  18. gce/
  19. grpc/
  20. hardcoded/
  21. led/
  22. logdog/
  23. luci_notify/
  24. lucicfg/
  25. lucictx/
  26. luciexe/
  27. mailer/
  28. milo/
  29. mmutex/
  30. provenance/
  31. resultdb/
  32. scheduler/
  33. scripts/
  34. server/
  35. standalone/
  36. starlark/
  37. swarming/
  38. tokenserver/
  39. tools/
  40. vpython/
  41. web/
  42. .gitallowed
  43. .gitattributes
  44. .golangci.yml
  45. AUTHORS
  46. codereview.settings
  47. CONTRIBUTING.md
  48. CONTRIBUTORS
  49. go.mod
  50. go.sum
  51. LICENSE
  52. OWNERS
  53. PRESUBMIT.py
  54. README.md
  55. tools.go
  56. WATCHLISTS
README.md

luci-go: LUCI services and tools in Go

GoReference

Installing

LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:

fetch infra
cd infra/go
eval `./env.py`
cd src/go.chromium.org/luci

It is now possible to directly install tools with go install:

go install go.chromium.org/luci/auth/client/cmd/...@latest
go install go.chromium.org/luci/buildbucket/cmd/...@latest
go install go.chromium.org/luci/cipd/client/cmd/...@latest
go install go.chromium.org/luci/client/cmd/...@latest
go install go.chromium.org/luci/cv/cmd/...@latest
go install go.chromium.org/luci/gce/cmd/...@latest
go install go.chromium.org/luci/grpc/cmd/...@latest
go install go.chromium.org/luci/logdog/client/cmd/...@latest
go install go.chromium.org/luci/luci_notify/cmd/...@latest
go install go.chromium.org/luci/lucicfg/cmd/...@latest
go install go.chromium.org/luci/luciexe/legacy/cmd/...@latest
go install go.chromium.org/luci/mailer/cmd/...@latest
go install go.chromium.org/luci/mmutex/cmd/...@latest
go install go.chromium.org/luci/resultdb/cmd/...@latest
go install go.chromium.org/luci/server/cmd/...@latest
go install go.chromium.org/luci/swarming/cmd/...@latest
go install go.chromium.org/luci/tokenserver/cmd/...@latest
go install go.chromium.org/luci/tools/cmd/...@latest

Contributing

Contributing uses the same flow as Chromium contributions.