Authored by qinchao

项目发布时,更新tags

... ... @@ -237,7 +237,6 @@ public class HttpUriContants {
* 工单系统
*/
public static final String LOAD_JAVA_PROJECT_ONLINE = "/releaseWork/loadJavaProjectOnline";
public static final String GET_RELEASEWORKJOBS = "/releaseWork/getReleaseWorkJobs";
public static final String GET_RELEASEWORKJOB_ID = "/releaseWork/getReleaseWorkJob";
public static final String CREATE_RELEASEWORKJOB = "/releaseWork/createReleaseWorkJob";
public static final String CREATE_CALLBACKTEST = "/releaseWork/callbackTest";
... ... @@ -257,6 +256,7 @@ public class HttpUriContants {
public static final String GET_SMSLOG = "/sms/getSmsLogsByMobile";
//java服务重启
public static final String JAVA_RESTART_UPDATE_HOST_TAGS = "/javaRestart/updateHostTags";
public static final String JAVA_RESTART_GET = "/javaRestart/query";
public static final String JAVA_RESTART_STATAUS = "/javaRestart/getProjectStatus";
public static final String JAVA_STOP_RESTART = "/javaRestart/stopOrRestart";
... ...
... ... @@ -259,6 +259,17 @@ public class ProjectBuildCtrl {
return new ModelAndView("project/project_build");
}
//发布的时候,启动一个线程 ,更新项目的tag
final String projectNamesForUpdateTag=project_name;
new Thread(() -> {
try {
httpRestClient.defaultGet(HttpUriContants.JAVA_RESTART_UPDATE_HOST_TAGS+"?projectNames="+projectNamesForUpdateTag,BaseResponse.class);
} catch (Exception e) {
log.error("project build update tags error {}",e);
}
}).start();
List<String> projectList=Arrays.asList(project_name.split(","));
//把要发布的项目重新组合,其中特殊情况的项目,先拿出来传递到前台,其余的普通项目直接发布
List<String> specialProjectLb=new ArrayList<>();
... ...