Compare commits

...

2 Commits

Author SHA1 Message Date
lddsb b54a0fc981 fix: patch for k8s missing env 2020-04-29 11:04:24 +08:00
lddsb b7390525e1 fix: default image cdn url 2020-01-20 11:34:31 +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"
)
@@ -151,6 +151,11 @@ func main() {
},
}
// patch for k8s missing env
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
@@ -237,12 +237,12 @@ get picture url
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.Extra.Pic.SuccessPicURL != "" {
pics["success"] = p.Extra.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.Extra.Pic.FailurePicURL != "" {
pics["failure"] = p.Extra.Pic.FailurePicURL
}