|
@@ -10,6 +10,7 @@ import cn.reghao.autodop.dagent.app.DockerAppServiceImpl;
|
|
|
import cn.reghao.autodop.dagent.app.ZipAppServiceImpl;
|
|
import cn.reghao.autodop.dagent.app.ZipAppServiceImpl;
|
|
|
import cn.reghao.jdkutil.result.Result;
|
|
import cn.reghao.jdkutil.result.Result;
|
|
|
import cn.reghao.jdkutil.result.ResultStatus;
|
|
import cn.reghao.jdkutil.result.ResultStatus;
|
|
|
|
|
+import cn.reghao.jdkutil.serializer.JsonConverter;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
@@ -34,18 +35,16 @@ public class AppRpcClazzImpl implements IAppRpcClazz {
|
|
|
String packType = deployParam.getPackType();
|
|
String packType = deployParam.getPackType();
|
|
|
|
|
|
|
|
StatusResult appStatus;
|
|
StatusResult appStatus;
|
|
|
- DeployResult deployResult = new DeployResult(buildLogId, Machine.ID, Machine.IPV4);
|
|
|
|
|
|
|
+ DeployResult deployResult = new DeployResult(buildLogId, Machine.ID);
|
|
|
try {
|
|
try {
|
|
|
switch (PackType.valueOf(packType)) {
|
|
switch (PackType.valueOf(packType)) {
|
|
|
case docker:
|
|
case docker:
|
|
|
appStatus = dockerAppServiceImpl.deploy(deployParam);
|
|
appStatus = dockerAppServiceImpl.deploy(deployParam);
|
|
|
- deployResult.setResult(Result.result(ResultStatus.SUCCESS));
|
|
|
|
|
- deployResult.setAppStatus(appStatus);
|
|
|
|
|
|
|
+ deployResult.setResult(Result.result(ResultStatus.SUCCESS, JsonConverter.objectToJson(appStatus)));
|
|
|
break;
|
|
break;
|
|
|
case zip:
|
|
case zip:
|
|
|
appStatus = zipAppServiceImpl.deploy(deployParam);
|
|
appStatus = zipAppServiceImpl.deploy(deployParam);
|
|
|
- deployResult.setResult(Result.result(ResultStatus.SUCCESS));
|
|
|
|
|
- deployResult.setAppStatus(appStatus);
|
|
|
|
|
|
|
+ deployResult.setResult(Result.result(ResultStatus.SUCCESS, JsonConverter.objectToJson(appStatus)));
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
String msg = String.format("应用包类型 %s 不存在", deployParam.getPackType());
|
|
String msg = String.format("应用包类型 %s 不存在", deployParam.getPackType());
|