|
|
@@ -4,7 +4,6 @@ import cn.reghao.devops.common.agent.app.dto.AppInfo;
|
|
|
import cn.reghao.devops.common.msg.constant.NodeStatus;
|
|
|
import cn.reghao.devops.common.msg.event.EvtAppStatResult;
|
|
|
import cn.reghao.devops.manager.app.db.repository.AppDeployingRepository;
|
|
|
-import cn.reghao.devops.manager.app.db.repository.log.BuildLogRepository;
|
|
|
import cn.reghao.devops.manager.app.db.repository.log.DeployLogRepository;
|
|
|
import cn.reghao.devops.manager.app.model.constant.DeployStatus;
|
|
|
import cn.reghao.devops.manager.app.model.po.AppBuilding;
|
|
|
@@ -38,16 +37,14 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
public class DeployStatImpl implements DeployStat {
|
|
|
- private final BuildLogRepository buildLogRepository;
|
|
|
private final DeployLogRepository deployLogRepository;
|
|
|
private final BuildDeployNotify buildDeployNotify;
|
|
|
private final MachineService machineService;
|
|
|
private final AppDeployingRepository deployingRepository;
|
|
|
|
|
|
- public DeployStatImpl(BuildLogRepository buildLogRepository, DeployLogRepository deployLogRepository,
|
|
|
+ public DeployStatImpl(DeployLogRepository deployLogRepository,
|
|
|
BuildDeployNotify buildDeployNotify, MachineService machineService,
|
|
|
AppDeployingRepository deployingRepository) {
|
|
|
- this.buildLogRepository = buildLogRepository;
|
|
|
this.deployLogRepository = deployLogRepository;
|
|
|
this.buildDeployNotify = buildDeployNotify;
|
|
|
this.machineService = machineService;
|
|
|
@@ -210,7 +207,11 @@ public class DeployStatImpl implements DeployStat {
|
|
|
String appId = appConfig.getAppId();
|
|
|
String appName = appConfig.getAppName();
|
|
|
String bindPorts = appConfig.getBindPorts();
|
|
|
- String packagePath = appDeploying.getBuildLog().getPackagePath();
|
|
|
+ String packagePath = "";
|
|
|
+ BuildLog buildLog = appDeploying.getBuildLog();
|
|
|
+ if (buildLog != null) {
|
|
|
+ packagePath = buildLog.getPackagePath();
|
|
|
+ }
|
|
|
int totalDeployed = 0;
|
|
|
return new AppRunningVO(appId, appName, bindPorts, packagePath, totalDeployed);
|
|
|
}).collect(Collectors.toList());
|