Authored by qinchao

docker工单只能单个发布

... ... @@ -39,7 +39,11 @@ public class ProjectEnvironment {
}
public static List<String> getDockerEnvironments(){
public static List<String> getDockerEnvironments(String projectName){
if(projectName!=null&&projectName.contains("yoho-shop-manage")){
//该项目没有灰度
return Arrays.asList("yoho-online");
}
return dockerEnvironments;
}
... ...
... ... @@ -64,7 +64,7 @@ public class DockerBuildCtrl {
}
}
model.addAttribute("clusters", JSON.toJSONString(this.getDockerClusterMap()));
model.addAttribute("environments", ProjectEnvironment.getDockerEnvironments());
model.addAttribute("environments", ProjectEnvironment.getDockerEnvironments(null));
model.addAttribute("projectTypes", ProjectEnvironment.getDockerProjectTypeMap());
return new ModelAndView("project/docker_project");
}
... ...
... ... @@ -51,7 +51,7 @@ public class WorkSystemCtrl {
public ModelAndView toAddWork(Model model) {
model.addAttribute("platforms", Platform.getPlatforms());
model.addAttribute("dockerEnvironments", ProjectEnvironment.getDockerEnvironments());
//model.addAttribute("dockerEnvironments", ProjectEnvironment.getDockerEnvironments(null));
model.addAttribute("projectTypes", ProjectEnvironment.getDockerProjectTypeMap());
BaseResponse<List<User>> resp = httpRestClient.exchangeForget(HttpUriContants.GET_All_USER, new ParameterizedTypeReference<BaseResponse<List<User>>>() {
}, null);
... ... @@ -162,7 +162,7 @@ public class WorkSystemCtrl {
}
}
}else if (Platform.DOCKER.equals(platform)) {
envs.addAll(ProjectEnvironment.getDockerEnvironments());
envs.addAll(ProjectEnvironment.getDockerEnvironments(projects));
}
return envs;
}
... ...