|
|
@@ -248,6 +248,7 @@ public class EnvironmentServiceImpl implements EnvironmentService {
|
|
|
pod.setNamespace(applicationProperties.getDeploymentNamespace());
|
|
|
podApi.delete(pod);
|
|
|
result.setDeployStatus(DeployStatus.RESTARTING);
|
|
|
+ result.setDeployStartTime(LocalDateTime.now());
|
|
|
return EnvironmentConverter.convertToVO(environmentDAO.save(result));
|
|
|
}
|
|
|
|
|
|
@@ -270,7 +271,7 @@ public class EnvironmentServiceImpl implements EnvironmentService {
|
|
|
for (Environment environment : environments) {
|
|
|
if (environment.getDeployStartTime().isBefore(startTime)) {
|
|
|
environment.setDeployStatus(DeployStatus.FAIL);
|
|
|
- environment.setBuildOutput("Timeout interrupt.");
|
|
|
+ environment.setDeployOutput("Timeout interrupt.");
|
|
|
logger.info("Interrupt deployTask: " + environment.getId());
|
|
|
environmentDAO.save(environment);
|
|
|
} else {
|
|
|
@@ -284,6 +285,7 @@ public class EnvironmentServiceImpl implements EnvironmentService {
|
|
|
V1DeploymentStatus status = deployments.get(0).getStatus();
|
|
|
List<V1DeploymentCondition> conditions = status.getConditions();
|
|
|
if (!CollectionUtils.isEmpty(conditions)) {
|
|
|
+ logger.info(conditions.stream().map(condition -> condition.toString()).collect(Collectors.joining("\n----\n")));
|
|
|
Collections.sort(conditions, Comparator.comparingLong(c -> ((V1DeploymentCondition)c).getLastUpdateTime().getMillis()).reversed());
|
|
|
V1DeploymentCondition condition = conditions.get(0);
|
|
|
switch (condition.getType()) {
|