deploybot

package module
v0.0.0-...-ad54c1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

Google Cloud Deploy Bot

Push Google Cloud Deploy notifications to Slack or Google Chat!

This repo is indended as an example, and as a first step, to adding Google Cloud Deploy to your ChatOps suite of integrations.

Examples

google chat example slack example

Instructions

  1. Have a Google Cloud Deploy pipeline set up.

  2. Create a Google Cloud Function, defining:

    1. Entry point is CloudFuncPubSubCDOps.
    2. Environment value TOKEN = Slack's bot token or Google Chat Service Account Key JSON data (1).
    3. Environment value CHANNEL = Slack's channel id or Google Chat space id.
    4. Environment value CHATAPP = values can be slack or google.
  3. Subscribe to the clouddeploy-operations topic on Google Pub/Sub and use the Cloud Function above as a trigger.


Notes

(1) If you are minimising the Service Account's JSON data be careful about removing all blank spaces as it might break the private key.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudFuncPubSubCDOps

func CloudFuncPubSubCDOps(ctx context.Context, m gcpclouddeploy.OpsMessage) error

CloudFuncPubSubCDOps is an entry point function for Google Cloud Functions which is triggered by a PubSub notification using Cloud Deploy's "clouddeploy-operations" topic

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL