Skip to content
Drone plugin to send notifications to google chat
Go Dockerfile
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.
google-chat
.drone.yml
.gitignore
Dockerfile
Dockerfile.arm
Dockerfile.arm64
Dockerfile.windows
Gopkg.lock
Gopkg.toml
README.md
logo.png
main.go
plugin.go

README.md

drone-google-chat

Build Status Go Doc Go Report

Drone plugin for sending google chat notifications. For the usage information and a listing of the available options please reference TBD.

This plugin is currently experimental since the google chat apis haven't been released

Build

Build the binary with the following commands:

drone exec

Docker

Build the docker image with the following commands:

drone exec
docker build -t peloton/drone-google-chat .

Usage

Execute from the working directory:

You need to create an incomming hook from the google chat room. The webhook is everything minus the &token=... and the token is just the token itself.

docker run --rm \
  -e GOOGLE_CHAT_WEBHOOK=https://chat.googleapis.com/v1/spaces/... \
  -e GOOGLE_CHAT_KEY=somekey
  -e GOOGLE_CHAT_TOKEN=sometoken
  -e DRONE_REPO_OWNER=octocat \
  -e DRONE_REPO_NAME=hello-world \
  -e DRONE_COMMIT_SHA=7fd1a60b01f91b314f59955a4e4d4e80d8edf11d \
  -e DRONE_COMMIT_BRANCH=master \
  -e DRONE_COMMIT_AUTHOR=octocat \
  -e DRONE_BUILD_NUMBER=1 \
  -e DRONE_BUILD_STATUS=success \
  -e DRONE_BUILD_LINK=http://github.com/octocat/hello-world \
  -e DRONE_TAG=1.0.0 \
  peloton/drone-google-chat

Contribution

This repo is setup in a way that if you enable a personal drone server to build your fork it will build and publish your image (makes it easier to test PRs and use the image till the contributions get merged)

  • Build local DRONE_REPO_OWNER=josmo DRONE_REPO_NAME=drone-google-chat drone exec
  • on your server just make sure you have DOCKER_USERNAME, DOCKER_PASSWORD, and PLUGIN_REPO set as secrets
You can’t perform that action at this time.