Compare commits

...

2 Commits

Author SHA1 Message Date
lddsb c8bc5d889d fix: patch for k8s missing env 2020-04-29 10:59:46 +08:00
lddsb a651a73cbd fix: default image cdn url 2020-01-20 11:36:34 +08:00
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -5,7 +5,7 @@ import (
"log"
"os"
_ "github.com/joho/godotenv/autoload"
"github.com/joho/godotenv"
"github.com/urfave/cli"
)
@@ -210,6 +210,11 @@ func main() {
},
}
// kubernetes runner patch
if _, err := os.Stat("/run/drone/env"); err == nil {
godotenv.Overload("/run/drone/env")
}
if err := app.Run(os.Args); nil != err {
log.Println(err)
}
+2 -2
View File
@@ -345,12 +345,12 @@ func (p *Plugin) getEmoticon() string {
func (p *Plugin) getPicURL() string {
pics := make(map[string]string)
// success picture url
pics["success"] = "https://ws4.sinaimg.cn/large/006tNc79gy1fz05g5a7utj30he0bfjry.jpg"
pics["success"] = "https://wx1.sinaimg.cn/large/006tNc79gy1fz05g5a7utj30he0bfjry.jpg"
if p.Custom.Pic.SuccessPicURL != "" {
pics["success"] = p.Custom.Pic.SuccessPicURL
}
// failure picture url
pics["failure"] = "https://ws1.sinaimg.cn/large/006tNc79gy1fz0b4fghpnj30hd0bdmxn.jpg"
pics["failure"] = "https://wx1.sinaimg.cn/large/006tNc79gy1fz0b4fghpnj30hd0bdmxn.jpg"
if p.Custom.Pic.FailurePicURL != "" {
pics["failure"] = p.Custom.Pic.FailurePicURL
}