Skip to content

drone-plugins/drone-slack-blame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drone-slack-blame

Build Status Gitter chat Join the discussion at https://discourse.drone.io Drone questions at https://stackoverflow.com Go Doc Go Report

Drone plugin to send build status blames via Slack. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/drone-slack-blame

Docker

Build the Docker image with the following command:

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/Dockerfile.linux.amd64 --tag plugins/slack-blame .

Usage

docker run --rm \
  -e PLUGIN_TOKEN=xxxxx \
  -e PLUGIN_CHANNEL=dev \
  -e PLUGIN_SUCCESS_USERNAME="Happy Keanu (on behalf of Drone)" \
  -e PLUGIN_SUCCESS_ICON=":happy_keanu:" \
  -e PLUGIN_SUCCESS_MESSAGE="The build is fixed!" \
  -e PLUGIN_SUCCESS_IMAGE_ATTACHMENTS="http://i.imgur.com/TP4PIxc.jpg" \
  -e PLUGIN_FAILURE_USERNAME="Sad Keanu (on behalf of Drone)" \
  -e PLUGIN_FAILURE_ICON=":sad_keanu:" \
  -e PLUGIN_FAILURE_MESSAGE="The build is broken!" \
  -e PLUGIN_FAILURE_IMAGE_ATTACHMENTS="http://cdn.meme.am/instances/51000361.jpg" \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  plugins/slack-blame