feat(core): add orchestration fields to Deployment record
Extends Deployment with targetState, deploymentStrategy, replicaStates (List<Map<String,Object>>), and deployStage. Updates withStatus() to carry the new fields through.
This commit is contained in:
@@ -1,13 +1,30 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public record Deployment(UUID id, UUID appId, UUID appVersionId, UUID environmentId,
|
||||
DeploymentStatus status, String containerId, String containerName,
|
||||
String errorMessage, Instant deployedAt, Instant stoppedAt, Instant createdAt) {
|
||||
public record Deployment(
|
||||
UUID id,
|
||||
UUID appId,
|
||||
UUID appVersionId,
|
||||
UUID environmentId,
|
||||
DeploymentStatus status,
|
||||
String targetState,
|
||||
String deploymentStrategy,
|
||||
List<Map<String, Object>> replicaStates,
|
||||
String deployStage,
|
||||
String containerId,
|
||||
String containerName,
|
||||
String errorMessage,
|
||||
Instant deployedAt,
|
||||
Instant stoppedAt,
|
||||
Instant createdAt
|
||||
) {
|
||||
public Deployment withStatus(DeploymentStatus newStatus) {
|
||||
return new Deployment(id, appId, appVersionId, environmentId, newStatus,
|
||||
targetState, deploymentStrategy, replicaStates, deployStage,
|
||||
containerId, containerName, errorMessage, deployedAt, stoppedAt, createdAt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user