Skip to content
Drone plugin for sending Typetalk notifications
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.drone.yml
.gitignore
CONTRIBUTING.md
Dockerfile Updated Dec 19, 2018
LICENSE Initial commit Dec 16, 2018
Makefile
README.md Updated README Dec 22, 2018
main.go Updated structs Dec 22, 2018
main_test.go Added tests Dec 21, 2018

README.md

drone-typetalk

Drone plugin for sending Typetalk notifications.

Badge Description
Build Status Travis Build Status
Build Status Drone Build Status
Go Report Card Go Report
Join the chat at https://gitter.im/is2ei/drone-typetalk Gitter chat

Usage

The Typetalk plugin posts build status messages to your channel. The below configuration demonstrates
simple usage.

steps:
- name: typetalk
  image: is2ei/typetalk
  settings:
    typetalk_token: xxxxxxxx
    topic_id: 12345

Example configuration with webhook sourced from a secret:

steps:
- name: typetalk
  image: is2ei/typetalk
  settings:
    typetalk_token:
      from_secret: typetalk_token
    topic_id:
      from_secret: topic_id

Example configuration for success and failure messages:

steps:
- name: typetalk
  image: is2ei/typetalk
  settings:
    typetalk_token: xxxxxxxx
    topic_id: 12345
  when:
    status: [ success, failure ]

Example configuration with a custom message template:

steps:
- name: typetalk
  image: is2ei/typetalk
  settings:
    typetalk_token: xxxxxxxx
    topic_id: 12345
  template: >
    {{#success build.status}}
      build {{build.number}} succeeded. Good job.
    {{else}}
      build {{build.number}} failed. Fix me please.
    {{/success}}

Parameters Reference

typetalk_token
Typetalk Token

topic_id
Topic ID to send notification.

template
Overwrite the default message temnplate.
It uses github.com/drone/drone-template-lib/template.

template_raw
Overwrite the default message temnplate.
It uses text/template If both template and template_raw values are set, template value will override the message template.

Template Reference

drone.isDrone
Boolean value, indicates the runtime environment is Drone. DRONE

drone.hostname
String literal, provides the Drone agent hostname. DRONE_MACHINE

drone.remoteURL
DRONE_REMOTE_URL

system.host
String literal, provides the Drone server hostname. DRONE_SYSTEM_HOST

system.hostname
String literal, provides the Drone server hostname. DRONE_SYSTEM_HOSTNAME

system.version
String literal, provides the Drone server version. DRONE_SYSTEM_VERSION

runner.host
String literal, provides the Drone agent hostname. DRONE_RUNNER_HOST

runner.hostname
String literal, provides the Drone agent hostname. DRONE_RUNNER_HOSTNAME

runner.platform
String literal, provides the Drone agent os and architecture. DRONE_RUNNER_PLATFORM

runner.label
DRONE_RUNNER_LABEL

git.HTTPURL
String literal, provides the repository git+http url. DRONE_GIT_HTTP_URL

git.SSHURL
String literal, provides the repository git+ssh url. DRONE_GIT_SSH_URL

repo.fullName
String literal, provides the full name of the repository. DRONE_REPO

repo.owner
repository owner DRONE_REPO_OWNER

repo.name
String literal, provides the repository name. DRONE_REPO_NAME

repo.branch
String literal, provides the default repository branch (e.g. master). DRONE_REPO_BRANCH

repo.link
String literal, provides the repository http link. DRONE_REPO_LINK

repo.nameSpace
String literal, provides the repository namespace (e.g. account owner) DRONE_REPO_NAMESPACE

repo.private
Boolean value, indicates the repository is public or private. DRONE_REPO_PRIVATE

repo.SCM
String literal, provides the repository version control system. [DRONE_REPO_SCM](String literal, provides the repository version control system.)

build.branch
String literal, provides the branch for the current build. DRONE_BRANCH

build.created
Unix timestamp, provides the date and time when the build was created in the system. DRONE_BUILD_CREATED

build.event
build event type enumeration, one of push, pull_request, tag, deployment

build.number
Integer value, provides the current build number. DRONE_BUILD_NUMBER

build.started
Unix timestamp, provides the date and time when the build was started. DRONE_BUILD_STARTED

build.status
build status type enumeration, either success or failure DRONE_BUILD_STATUS

build.link
DRONE_BUILD_LINK

build.pullRequest
Integer value, provides the pull request number for the current build. This value is only set if the build event is of type pull request. DRONE_PULL_REQUEST

build.sourceBranch
String literal, provides the source branch for a pull request. DRONE_SOURCE_BRANCH

build.targetBranch
String literal, provides the target branch for a pull request. DRONE_TARGET_BRANCH

build.tag
String literal, provides the tag name for the current build. This value is only set if the build event is of type tag. DRONE_TAG

commit.commit
String literal, provides the commit sha for the current build. DRONE_COMMIT

commit.message
String literal, provides the commit message for the current build. DRONE_COMMIT_MESSAGE

commit.after
String literal, provides the commit sha for the current build. DRONE_COMMIT_AFTER

commit.author
String literal, provides the author username for the current commit. DRONE_COMMIT_AUTHOR

commit.authorAvatar
String literal, provides the author avatar for the current commit. DRONE_COMMIT_AUTHOR_AVATAR

commit.authorEmail
String literal, provides the author email for the current commit. DRONE_COMMIT_AUTHOR_EMAIL

commit.authorName
String literal, provides the author name for the current commit. DRONE_COMMIT_AUTHOR_NAME

commit.before
String literal, provides the parent commit sha for the current build. DRONE_COMMIT_BEFORE

commit.branch
String literal, provides the branch for the current build. DRONE_COMMIT_BRANCH

commit.link
String literal, provides the http link to the current commit in the remote source code management system (e.g. GitHub). DRONE_COMMIT_LINK

commit.SHA
String literal, provides the commit sha for the current build. DRONE_COMMIT_SHA

commit.ref
String literal, provides the reference for the current build. DRONE_COMMIT_REF

You can’t perform that action at this time.