This is built using source code posted here: https://cloud.google.com/cloud-build/docs/configure-third-party-notifications
- Setup a webhook and get the webhook URL
- Get your GitHub Id. It's generally the value in the URL right after
github.com/
. For example, my GitHub Id isVikramTiwari
- Replace the variables and deploy to cloud functions
gcloud functions deploy cloud-build-slack-notifier --trigger-topic cloud-builds --runtime=nodejs10 --memory=128MB --set-env-vars SLACK_WEBHOOK_URL=<REPLACE_WITH_YOUR_SLACK_WEBHOOK_URL>,GITHUB_ID=<URL_SLUG_FOR_YOUR_OR_ORG_USERNAME>
Enjoy!