Sign inSign up

madrisan/mattermost-notify

By madrisan

•Updated over 1 year ago

A simple Mattermost (or Slack) notifier written in Go

Image
Monitoring & observability
1

100K+

madrisan/mattermost-notify repository overview

⁠Quick reference

⁠What is Mattermost Notify?

go-mattermost-notify logo

Mattermost Notify (go-mattermost-notify) is a simple and open-source client written in Go which can post messages to Mattermost using its REST API v4. go-mattermost-notify makes use of the Go libraries http and url for interacting with a Mattermost server and Cobra⁠ coupled with Viper⁠ to implement the CLI interface.

⁠How to use this image

⁠Example of a Mattermost Post

go-mattermost-notify post example

For more details see the official GitHub site: https://github.com/madrisan/go-mattermost-notify⁠

⁠How to use this image in kubernetes

A container can be defined as in the follow code snippet:

spec:
  template:
    spec:
      containers:
      - name: mattermost-notify
        image: docker.io/madrisan/mattermost-notify:latest
        imagePullPolicy: "IfNotPresent"
        command:
        - go-mattermost-notify
        - post
        args:
        - --author
        - "CI/CD Robot"
        - --channel
        - "@deployments"
        - --level
        - "success"
        - --message
        - "This is a test message sent by `go-mattermost-notify` :tada:\\nGitHub Project page: [madrisan/go-mattermost-notify](https://github.com/madrisan/go-mattermost-notify)"
        - --team
        - "devops"
        - --title
        - "Job status"
        env:
        - name: MATTERMOST_ACCESS_TOKEN
          valueFrom:
            secretKeyRef:
              name: mattermost-secret
              key: mattermost-access-token
        - name: MATTERMOST_URL
          value: 'https://mattermost.example.com'
        - name: SSL_CERT_FILE
          value: "/var/run/secrets/ca.crt"

Note that the variable SSL_CERT_FILE is optional and useful when the SSL certificate of the Mattermost site is signed by an internal CA.

⁠License

The source code and the Dockerfile are licensed under Apache 2.0⁠.

Tag summary

Content type

Image

Digest

sha256:9e3d83269…

Size

7.4 MB

Last updated

over 1 year ago

docker pull madrisan/mattermost-notify