All Projects → Philmod → google-cloud-build-slack

Philmod / google-cloud-build-slack

Licence: Apache-2.0 License
Slack integration for Google Cloud Container Builder, using Google Cloud Functions

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to google-cloud-build-slack

git-slack-notify
Sends Slack notifications for new commits in Git repositories
Stars: ✭ 12 (-84.21%)
Mutual labels:  slack
website
PySlackers website for invites and learning resources
Stars: ✭ 61 (-19.74%)
Mutual labels:  slack
botdarr
Slack/Discord/Telegram/Matrix bot for accessing radarr, sonarr, and lidarr
Stars: ✭ 76 (+0%)
Mutual labels:  slack
oauth2-slack
Slack OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Stars: ✭ 20 (-73.68%)
Mutual labels:  slack
CWSlack-SlashCommands
Retrieve ConnectWise information into Slack channels and DMs
Stars: ✭ 54 (-28.95%)
Mutual labels:  slack
hubot-code-review
A Hubot script for GitHub code review on Slack.
Stars: ✭ 38 (-50%)
Mutual labels:  slack
zoom-slack-status-updater
Update your Slack status automatically when you join a Zoom meeting.
Stars: ✭ 23 (-69.74%)
Mutual labels:  slack
concourse-slack-notifier
A structured Slack notification resource for Concourse
Stars: ✭ 17 (-77.63%)
Mutual labels:  slack
logging
💥 Universal logging support to Tracy / Nette Framework (@nette)
Stars: ✭ 18 (-76.32%)
Mutual labels:  slack
slack-php-app-framework
Robust PHP framework for building Slack apps in PHP
Stars: ✭ 29 (-61.84%)
Mutual labels:  slack
magento2-module-slack
Magento 2 Module to send Notifications to a Slack Channel via Webhook.
Stars: ✭ 14 (-81.58%)
Mutual labels:  slack
bitbot
Bitbot: Rack based Slack bot with a responder DSL and support for Wit.ai natural language processing.
Stars: ✭ 13 (-82.89%)
Mutual labels:  slack
NLog.Slack
An NLog target for Slack - your logs in one place and instantly searchable, everywhere.
Stars: ✭ 46 (-39.47%)
Mutual labels:  slack
slacky-dark
Dark mode theme for Slack desktop clients
Stars: ✭ 24 (-68.42%)
Mutual labels:  slack
ChatViewController
💬 ChatViewController, ChatBar, ImagePicker like Slack Application. Message App written in Swift
Stars: ✭ 47 (-38.16%)
Mutual labels:  slack
worldcup-slack-bot
WorldCupBot will notify a Slack channel/group for every match during a FIFA World Cup
Stars: ✭ 33 (-56.58%)
Mutual labels:  slack
setup-linux-debian
Installs essential JavaScript development programs.
Stars: ✭ 16 (-78.95%)
Mutual labels:  slack
iris
Watch on Kubernetes events, filter and send them as standard wehbook to any system
Stars: ✭ 57 (-25%)
Mutual labels:  slack
slack-reminder
Slack remind generator
Stars: ✭ 31 (-59.21%)
Mutual labels:  slack
slack widgets
An abstraction of the JSON structure needed to create widgets in Slack message attachments
Stars: ✭ 14 (-81.58%)
Mutual labels:  slack

google-cloud-build-slack

Slack integration for Google Cloud Build, using Google Cloud Functions to post messages to Slack when a build reaches a specific state.

Setup

  1. Create a Slack app, and copy the webhook URL:
export SLACK_WEBHOOK_URL=my-slack-webhook-url
  1. Set the PROJECT_ID variable:
export PROJECT_ID=my-project-id
  1. [Optionally] Set a github token to obtain github commit author info in slack messages if applicable. Please refer to the current limitations.
export GITHUB_TOKEN=my-token
  1. [Optionally] Set the status you want a message for, here are the default ones:
export GC_SLACK_STATUS="SUCCESS FAILURE TIMEOUT INTERNAL_ERROR"
  1. Create the function with setup.sh (Option 1) OR serverless framework (Option 2)

Option 1: Deploy with script

  • [Optionally] Set a specific BUCKET_NAME and a FUNCTION_NAME.
  • Create the function:
. ./setup.sh
# OR
npm run setup

Option 2: Deploy with serverless framework

  1. Install serverless
npm install serverless -g
  1. Ensure that the value of project.credentials in serverless.yml points to credentials with appropriate roles Serverless can use to create resources in your Project.

  2. Deploy

serverless deploy

Teardown

If deployed with script

The teardown script will delete the function FUNCTION_NAME, and the bucket BUCKET_NAME.

. ./teardown.sh
# OR
npm run teardown

If deployed with serverless framework

Remove

serverless remove

FAQ

How much does it cost?

Each build invokes 3 times the function:

  • when the build is queued
  • when the build starts
  • when the build reaches a final status.

Here is the GCF pricing for calculation.

Can I use an existing bucket?

Yes if deploying with the setup script, specify the BUCKET_NAME:

exports BUCKET_NAME=my-bucket

If deploying with the serverless framework however, this option is not yet available in the Google Cloud Functions provider plugin, but hopefully will be in the near future as an issue has been opened.

How can I update a function?

If you use the setup script with the same FUNCTION_NAME, it will update the existing function.

If you use serverless, simply re running serverless deploy will update the existing function.

Where can I find the SLACK_WEBHOOK_URL?

After creating an application on Slack, active the Incoming Webhooks. You'll find the url on that page: slack webhook

Why do I have to source the script?

In the case where a BUCKET_NAME is not defined, a random one is generated. And in order to delete it during the teardown, the variable has to be exported from the setup script.

What are the limitations of using github token to get github commit author info?

For github commit author info to be displayed, the cloud source repositories must be in the form of github_<OWNER>_<REPO> and there cannot be underscores in either <OWNER> or <REPO>. A possible solution to bypass this limitation would be to retrieve owner and repo info directly from GitHubEventsConfig.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].