|
|
@@ -113,10 +113,9 @@ func Build(c *gin.Context) { |
|
|
|
} |
|
|
|
token := "aaaaaa" |
|
|
|
masterKey := "master" |
|
|
|
domain := "" |
|
|
|
domain := svc.GetSysCfgStr("admin_host") |
|
|
|
if cfg.Prd == false { |
|
|
|
masterKey = "dev" |
|
|
|
domain = "http://ddstar.izhim.cn" |
|
|
|
} |
|
|
|
url := "http://120.76.175.204:8080/job/" + keys + "/buildWithParameters?version=" + req.Version + "×tamp=" + utils.Int64ToStr(time.Now().Unix()) + "&token=" + token + "&branch=" + masterKey + "&domain=" + php2go.URLEncode(domain) |
|
|
|
tmp.Bit = strings.Join(req.Bit, ",") |
|
|
@@ -133,31 +132,26 @@ func Build(c *gin.Context) { |
|
|
|
tmp1.Platform = v1 |
|
|
|
db.Db.Insert(&tmp1) |
|
|
|
newUrl := url |
|
|
|
newUrl += "&bit=" + v + "&android_id=" + utils.IntToStr(tmp1.Id) |
|
|
|
newUrl += "&channel=" + v1 + "&&bit=" + v + "&android_id=" + utils.IntToStr(tmp1.Id) |
|
|
|
getcurl(newUrl) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
ids := make([]string, 0) |
|
|
|
for _, v1 := range req.Platform { |
|
|
|
tmp1 := tmp |
|
|
|
tmp1.Platform = v1 |
|
|
|
db.Db.Insert(&tmp1) |
|
|
|
url += "&id=" + utils.IntToStr(tmp1.Id) |
|
|
|
getcurl(url) |
|
|
|
newUrl := url |
|
|
|
newUrl += "&channel=" + v1 + "&bit=" + strings.Join(req.Bit, ",") + "&android_id=" + utils.IntToStr(tmp1.Id) |
|
|
|
getcurl(newUrl) |
|
|
|
} |
|
|
|
url += "&bit=" + strings.Join(req.Bit, ",") + "&id=" + strings.Join(ids, ",") |
|
|
|
getcurl(url) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
e.OutSuc(c, "success", nil) |
|
|
|
return |
|
|
|
} |
|
|
|
func getcurl(url string) (string, error) { |
|
|
|
return "", nil |
|
|
|
client := &http.Client{} |
|
|
|
// 创建请求 |
|
|
|
request, err := http.NewRequest("GET", url, nil) |
|
|
|