Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/GoogleCloudPlatform/cloud-build-notifiers/lib/notifiers

  • v0.0.0-20210219212036-163c92a64b27
  • Source
  • Go
  • Socket score

Version published
Created
Source

Notifiers Golang library

This notifiers Go package exposes a lightweight, zero-magic, optional framework for writing new notifiers and extensions.

To write your own notifier using this package, all you need to do is write something that implements the notifiers.Notifier interface and then pass that to notifiers.Main in your Go executable's main method (or wherever). That Main function will set up your notifiers with your config from GCS and your secrets stored on Secret Manager. Feel free to copy the cloudbuild.yaml and Dockerfile in the notifiers that use this package, like http, to build and deploy your own notifier.

In order to filter on specific notifications, you can use the notifiers.EventFilter interface, again, optionally. This library provides two EventFilter implementations:

  • notifiers.CELPredicate: This filter uses a compiled-at-startup CEL program string to filter on incoming notifications. It uses a single input variable named build, which is the incoming Build proto from the Pub/Sub notifications. For example, you can write a filter like build.status == Build.Status.SUCCESS || "special" in build.tags to only notify on events that are successful or have the "special" build tag.

FAQs

Package last updated on 19 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc