drone-mattermost

command module
v0.0.0-...-3426df6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 5 Imported by: 0

README

About

Drone plugin for sending Mattermost notifications.

Usage

Add as a Drone pipeline step like the following:


steps:
- name: notify
  depends_on: [deploy]
  image: kenshaw/drone-mattermost
  settings:
    url: https://mattermost.<DOMAIN>
    token:
      from_secret: mattermost-token
    team: dev
    channel: town-square
      replace: |-
        [{
          "regexp": "\\\\[?((PRD|HR)-[0-9]+)\\\\]?",
          "replace": "[$1](https://mycompany.atlassian.net/browse/$1)"
        }]
    template: |-
      # {{uppercase (regexReplace "^master$" build.branch "staging")}} deployed
      **Successfully** deployed {{repo.owner}}/{{repo.name}} [`{{build.branch}}@{{truncate commit 7}}`]({{build.link}}) -> https://<URL> [[diff]({{commit.link}})]
      Author: `{{commit.author.username}}`
      > {{commit.message.title}}{{#if commit.message.body}}
      >
      {{{regexReplace "(?m)^" commit.message.body "> "}}}{{/if}}
  when:
    event: push
    status: [success]
    branch: [master, production]

Developing

$ ./build.sh
$ ./test.sh

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