Marketplace
>
cloudBuildNotifier
slack

cloudBuildNotifier

v
0.1.1
Latest Version
Likes
0
1
Installations
0
2
Views
0
19

Overview

Notify you of build updates by sending you notifications to Slack channel.

Usage

### How this function works Cloud Build sends all build event updates, along with build metadata, to Pub/Sub on the cloud-builds topic. Slack CloudBuildNotifier can be configured to listen to this topic, filter the messages it receives, and send messages to the Slack channel. ### To configure Slack notifications: 1. Create a [Slack app](https://api.slack.com/apps?new_app=1) for your desired Slack workspace. 2. Activate [incoming webhooks](https://api.slack.com/messaging/webhooks) to post messages from Cloud Build to Slack. 3. [Create an Incoming Webhook](https://api.slack.com/messaging/webhooks#create_a_webhook) - Your URL will look similar to the following: http://hooks.slack.com/services/ ### Filtering builds You can use the filters Config environment variable to filter build events. #### Filtering by trigger id You can filter by the trigger id of the build by providing an array with the ids of the triggers that you want to be notified of. See the example below. ```js { "filterId": ["a1cceec3-5c24-4822-a967-10fa0f12a802"] } ``` #### Filtering by status You can filter by the status of the build by providing an array with the statuses of the build that you want to be notified of. See build statuses below: - QUEUED - WORKING - SUCCESS - FAILURE - TIMEOUT - CANCELLED ```js { "status": ["FAILURE", "CANCELLED"] } ``` ### References - [Getting started with Incoming Webhooks](https://api.slack.com/messaging/webhooks#getting_started)
Cost
FREE
Cost
Version
0.1.1
Language
JAVASCRIPT
Created At
Updated At
Workspace
slack
Tags
slack
cloud-build
notifier
© 2022 Function Store