ProjectEnvironment.java
1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.ui.project;
import java.util.*;
public class ProjectEnvironment {
private static List<String> dockerEnvironments = Arrays.asList("yoho-online","yoho-gray");
//private static String[] dockerProjectTypes = {"node","java","php","ops","other"};
private static Map<String,String> map = new HashMap<>();
//docker相关
private static Map<String,String> dockerProjectTypeMap=new LinkedHashMap<>();
static{
map.put("aws", "http://172.31.16.167:8883/web/");
map.put("qcloud","http://172.31.16.167:8883/web/");
map.put("qcloud_gray","http://172.31.16.167:8883/web/");
map.put("aws_gray","http://172.31.16.167:8883/web/");
dockerProjectTypeMap.put("web","web");
dockerProjectTypeMap.put("media","media");
dockerProjectTypeMap.put("ci","核心系统ci");
dockerProjectTypeMap.put("ops","ops");
dockerProjectTypeMap.put("erp","erp");
}
public static List<String> getJavaEnvList(String project) {
return ProjectOnline.getJavaProjectByName(project).getSupportEnvList();
}
public static String getUrl(String envi){
if(map.containsKey(envi)){
return map.get(envi);
}else{
return "http://172.31.16.167:8883/web/";
}
}
public static List<String> getDockerEnvironments(String projectName){
if(projectName!=null&&projectName.contains("yoho-shop-manage")){
//该项目没有灰度
return Arrays.asList("yoho-online");
}
return dockerEnvironments;
}
public static Map<String,String> getDockerProjectTypeMap(){
return dockerProjectTypeMap;
}
}