herald

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 5 Imported by: 0

README

herald

Notify someone from some place about your success

Install

go install github.com/fullpipe/herald@latest

Usage

herald help

For example we want to notify grafana from local git repository

export GRAFANA_API_KEY=abirvalg
herald git grafana --host https://grafana.example.com:3000 --api-key ${GRAFANA_API_KEY} --tag TASK-123 --tag release --tag wtf-project
# or you could modify message
herald git grafana --host https://grafana.example.com:3000 --api-key ${GRAFANA_API_KEY} --tag TASK-123 --tag release --tag wtf-project -m "Project {{.project}} deployed. Going home."
Add anotations Feel the difference
! !

Places

Place tries to generate project metadata if possible. You could find available place options by herald PLACE help

Place Description
nowhere set meta as you want
git reads meta from local git repository
gitlab reads meta from gitlab ci env vars
Metadata

You could use metadata in message templates. For example:

Project {{.project}} deployed

Project: {{ or .project "none"}}
URL: {{ or .url "none"}}
Branch: {{ or .branch "none"}}
CommitSHA: {{ or .sha "none"}}
Author: {{ or .author "none"}}

Targets

It's where you will see your success. You could find available target options by herald nowhere TARGET --help.

Target Description Required options
cli just prints out to your terminal
grafana creates grafana annotation with tags --host, --api-key
slack send message to Slack channel --webhook

TODO:

  • ci
  • wrap in docker container
  • error handling
  • lint
  • commit message as meta.Description?
  • more targets
    • telegram
    • ...
  • more places
    • github actions
    • ...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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