Sign inSign up

goodwillaz/drone-config-plugin-slack

By goodwillaz

•Updated about 4 years ago

Image
0

308

goodwillaz/drone-config-plugin-slack repository overview

⁠Archived

This image is no longer updated. A newer version that uses Drone's Conversion Extension architecture instead is available at https://github.com/goodwillaz/drone-convert-plugin-slack⁠

⁠Drone.io Slack Config Plugin

This Drone.io⁠ config plugin automatically adds Slack notifications before and/or after the steps in a pipeline. It will work with the official drone-slack⁠ plugin (default) or Goodwill's drone-slack⁠ plugin (and probably any others floating around as long as they use PLUGIN_* environment variables for configuration).

⁠Running

This plugin is available on Docker Hub⁠ or you can optionally build and host yourself.

$ docker build --rm -t <your-repo>/drone-config-plugin-slack:latest .
$ drone push <your-repo>/drone-config-plugin-slack:latest
⁠Usage
⁠Docker Compose

(Necessary config portion shown only)

services:
  drone-server:
    ...
    environment:
      - DRONE_YAML_ENDPOINT=http://drone-config-plugin-slack:3000
      - DRONE_YAML_SECRET=${YAML_SECRET:?YAML_SECRET is required}
      ...
    depends_on:
      - drone-config-plugin-slack
      ...
  
  drone-config-plugin-slack:
    image: goodwillaz/drone-config-plugin-slack:latest
    environment:
      - PLUGIN_SECRET=${YAML_SECRET:?YAML_SECRET is required}
      - PLUGIN_GITHUB_TOKEN=${GITHUB_TOKEN}
      - SLACK_WEBHOOK=${SLACK_WEBHOOK}
⁠Bypass

If a step already exists that is named notify-before or notify-after, this config plugin will not prepend or append Slack notifications to the pipeline.

⁠Environment Variable Support

Here's a full list of environment variables supported by the plugin:

  • PLUGIN_SECRET (required)
  • PLUGIN_GITHUB_TOKEN (required; only Github is currently supported as a source)
  • PLUGIN_HOST (default: 0.0.0.0)
  • PLUGIN_PORT (default: 3000)
  • PLUGIN_IMAGE (default: plugin/slack)
  • PLUGIN_WHEN - (default: after; allowed: [before, after, both]; official Drone plugin only supports after, Goodwill plugin supports all options)
  • PLUGIN_DEBUG - (default: false)
  • SLACK_ - any environment variable beginning with SLACK_ is updated to PLUGIN_ and passed through to the actual Slack plugin
⁠Pipeline Support

This plugin also supports microadam's config pipeline plugin⁠.

⁠License

See the LICENSE⁠ file for license rights and limitations (BSD 3-clause).

Tag summary

Content type

Image

Digest

sha256:aef4eaa3b…

Size

42.8 MB

Last updated

about 4 years ago

docker pull goodwillaz/drone-config-plugin-slack