Skip to content

Instantly share code, notes, and snippets.

@kerkerj
Last active November 22, 2020 15:48
Show Gist options
  • Save kerkerj/c70eacccf813018756a67859e0249b83 to your computer and use it in GitHub Desktop.
Save kerkerj/c70eacccf813018756a67859e0249b83 to your computer and use it in GitHub Desktop.
drone.yml for drone-slack-blame
kind: pipeline
type: docker
name: default
steps:
- name: notify
image: plugins/slack-blame
settings:
token:
from_secret: drone_slack_blame_token
channel: dev
mapping:
myGithubUsername: mySlackDisplayName
teammate1GithubUsername: teammate1SlackDisplayName
success_template: |
{{#if ${DRONE_PULL_REQUEST} }}
✅ <https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/${DRONE_PULL_REQUEST}|Pull Request #${DRONE_PULL_REQUEST}>
{{else}}
✅ {{ uppercasefirst build.status }}: Build #{{ build.number }} (type: `{{ build.event }}`)
{{/if}}
Commit: <${CI_REPO_LINK}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
Branch: <${CI_REPO_LINK}/commits/${DRONE_SOURCE_BRANCH}|${DRONE_SOURCE_BRANCH}>
Author: ${DRONE_COMMIT_AUTHOR}
<${DRONE_BUILD_LINK}|Visit build page ↗>
# success_image_attachments:
# - "http://i.imgur.com/TP4PIxc.jpg"
failure_template: |
{{#if ${DRONE_PULL_REQUEST} }}
❌ <https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/${DRONE_PULL_REQUEST}|Pull Request #${DRONE_PULL_REQUEST}>
{{else}}
❌ {{ uppercasefirst build.status }}: Build #{{ build.number }} (type: `{{ build.event }}`)
{{/if}}
Commit: <${CI_REPO_LINK}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
Branch: <${CI_REPO_LINK}/commits/${DRONE_SOURCE_BRANCH}|${DRONE_SOURCE_BRANCH}>
Author: ${DRONE_COMMIT_AUTHOR}
<${DRONE_BUILD_LINK}|Visit build page ↗>
# failure_image_attachments:
# - "http://cdn.meme.am/instances/51000361.jpg"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment