...
|
...
|
@@ -454,14 +454,26 @@ public class DockerProjectCtrl { |
|
|
return rtn;
|
|
|
}
|
|
|
|
|
|
Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
|
|
//Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
|
|
|
|
|
/*
|
|
|
boolean normalStatusFlag=(boolean)statusMap.get("result");
|
|
|
if(!normalStatusFlag){
|
|
|
rtn.setCode(201);
|
|
|
rtn.setMessage("Docker服务非Normal状态,发布中止!");
|
|
|
return rtn;
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
Map<String,Object> statusMap=dockerServerDeployService.queryAppServiceInfo(clusterId,namespace,serviceName);
|
|
|
|
|
|
JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
|
|
if(containerJa==null){
|
|
|
rtn.setCode(201);
|
|
|
rtn.setMessage("Docker服务修改镜像服务发生异常,获取容器描述为空");
|
|
|
return rtn;
|
|
|
}
|
|
|
|
|
|
boolean currentImageLatestFlag=dockerServerDeployService.checkImageLatestWithModifyFlag(clusterId, namespace, serviceName,imageStore, containerJa,false);
|
|
|
if(currentImageLatestFlag){
|
|
|
//开始重新发布
|
...
|
...
|
@@ -540,7 +552,7 @@ public class DockerProjectCtrl { |
|
|
rtn.setMessage("Docker服务不存在,请联系运维人员");
|
|
|
return rtn;
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
Map<String,Object> statusMap=dockerServerDeployService.checkAppStatusIsNormal(clusterId,namespace,serviceName);
|
|
|
boolean normalStatusFlag=(boolean)statusMap.get("result");
|
|
|
if(!normalStatusFlag){
|
...
|
...
|
@@ -548,8 +560,15 @@ public class DockerProjectCtrl { |
|
|
rtn.setMessage("Docker服务非Normal状态,发布中止!");
|
|
|
return rtn;
|
|
|
}
|
|
|
JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
|
|
*/
|
|
|
Map<String,Object> statusMap=dockerServerDeployService.queryAppServiceInfo(clusterId,namespace,serviceName);
|
|
|
|
|
|
JSONArray containerJa=(JSONArray)statusMap.get("containerJa");
|
|
|
if(containerJa==null){
|
|
|
rtn.setCode(201);
|
|
|
rtn.setMessage("Docker服务修改镜像服务发生异常,获取容器描述为空");
|
|
|
return rtn;
|
|
|
}
|
|
|
//更改路径,更改之后自动重新部署
|
|
|
boolean currentImageLatestFlag=dockerServerDeployService.rollbackImageStore(clusterId, namespace, serviceName, containerJa,rollbackImageStore);
|
|
|
if(!currentImageLatestFlag){
|
...
|
...
|
@@ -577,8 +596,8 @@ public class DockerProjectCtrl { |
|
|
if(StringUtils.isBlank(clusterId)){
|
|
|
continue;
|
|
|
}
|
|
|
List<String> statusAndCreateAt=dockerServerDeployService.queryAppStatus(clusterId,namespace,serviceName);
|
|
|
statusMap.put(clusterId,statusAndCreateAt.get(0));
|
|
|
Map<String,Object> appStatusMap=dockerServerDeployService.queryAppServiceInfo(clusterId,namespace,serviceName);
|
|
|
statusMap.put(clusterId,String.valueOf(appStatusMap.get("queryDesc")));
|
|
|
}
|
|
|
|
|
|
boolean allNormal=false;
|
...
|
...
|
|