From 2d461f52338bc1406b3909c411fe750d73965da8 Mon Sep 17 00:00:00 2001 From: qingguo Date: Tue, 27 Mar 2018 14:40:10 +0800 Subject: [PATCH] [REV] change request api address in builder --- pkg/builder/apiHandler/service_action.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/builder/apiHandler/service_action.go b/pkg/builder/apiHandler/service_action.go index b1e9d0f43..b3e01c649 100644 --- a/pkg/builder/apiHandler/service_action.go +++ b/pkg/builder/apiHandler/service_action.go @@ -33,7 +33,11 @@ import ( //UpgradeService 滚动升级 func UpgradeService(tenantName, serviceAlias string, ru *model.RollingUpgradeTaskBody) error { - url := fmt.Sprintf("http://127.0.0.1:8888/v2/tenants/%s/services/%s/upgrade", tenantName, serviceAlias) + api := os.Getenv("REGION_API") + if api == "" { + api = "http://region.goodrain.me:8888" + } + url := fmt.Sprintf("%s/v2/tenants/%s/services/%s/upgrade", api, tenantName, serviceAlias) logrus.Debugf("rolling update new version: %s, url is %s", ru.NewDeployVersion, url) raw := struct { DeployVersion string `json:"deploy_version"`