support gtalk notification on drone.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-10-03 13:42:29 +08:00
parent 2decbaf729
commit 2c880a2d67
4 changed files with 17 additions and 4 deletions

View File

@ -23,6 +23,15 @@ pipeline:
matrix:
GO_VERSION: 1.7.1
gtalk:
image: appleboy/drone-gtalk
pull: true
to: appleboy.tw@gmail.com
when:
status: [ success, failure ]
matrix:
GO_VERSION: 1.7.1
facebook:
image: appleboy/drone-facebook
pull: true
@ -40,6 +49,8 @@ pipeline:
ignore_branch: true
when:
branch: master
matrix:
GO_VERSION: 1.7.1
services:
redis:

View File

@ -1 +1 @@
eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgIyByZXN0b3JlIHRoZSBjYWNoZSBmcm9tIGFuIHNmdHAgc2VydmVyCiAgcmVzdG9yZV9jYWNoZToKICAgIGltYWdlOiBhcHBsZWJveS9kcm9uZS1zZnRwLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDogWyAuZ2xpZGUsIHZlbmRvciBdCiAgICBpZ25vcmVfYnJhbmNoOiB0cnVlCgogIGJ1aWxkOgogICAgaW1hZ2U6IGFwcGxlYm95L2dvbGFuZy10ZXN0aW5nOiR7R09fVkVSU0lPTn0KICAgIGVudmlyb25tZW50OgogICAgICAtIEdPUEFUSD0vZ28KICAgIGNvbW1hbmRzOgogICAgICAtIG1ha2UgaW5zdGFsbAogICAgICAtIGNvdmVyYWdlIGFsbAoKICBsaW5lOgogICAgaW1hZ2U6IGFwcGxlYm95L2Ryb25lLWxpbmUKICAgIHB1bGw6IHRydWUKICAgIHRvOiB1MzU5NjUwZjkxOTQyN2I1MjI5MzMwYzcyMDVjNDdlZTQKICAgIHdoZW46CiAgICAgIHN0YXR1czogWyBzdWNjZXNzLCBmYWlsdXJlIF0KICAgICAgbWF0cml4OgogICAgICAgIEdPX1ZFUlNJT046IDEuNy4xCgogIGZhY2Vib29rOgogICAgaW1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IHJlZGlzOgogICAgaW1hZ2U6IHJlZGlzOmFscGluZQoKd29ya3NwYWNlOgogIHBhdGg6IC9nby9zcmMvZ2l0aHViLmNvbS9hcHBsZWJveS9nb3J1c2gKCm1hdHJpeDoKICBHT19WRVJTSU9OOgogICAgLSAxLjcuMQogICAgLSAxLjYuMwo.A944ZNCmn8WqJ1mTXFcOUPRk5LjvErNRu2uqm7QTpyQ

View File

@ -1,9 +1,10 @@
package config
import (
"gopkg.in/yaml.v2"
"io/ioutil"
"runtime"
"gopkg.in/yaml.v2"
)
// ConfYaml is config structure.

View File

@ -3,11 +3,12 @@ package main
import (
"flag"
"fmt"
"github.com/appleboy/gorush/config"
"github.com/appleboy/gorush/gorush"
"log"
"os"
"strconv"
"github.com/appleboy/gorush/config"
"github.com/appleboy/gorush/gorush"
)
func checkInput(token, message string) {