build method
Implementation
DeployAttempt build() {
final status = _stages?.last.stageStatus;
return DeployAttempt(
id: Uuid().v4obj(),
cloudCapsuleId: _cloudCapsuleId,
attemptId: _attemptId.toString(),
status: _status ?? status,
startedAt: _startedAt ?? _stages?.first.startedAt,
endedAt: _endedAt ?? _stages?.last.endedAt,
statusInfo: _statusInfo,
serverpodVersion: _serverpodVersion,
dartVersion: _dartVersion,
commitHash: _commitHash,
commitMessage: _commitMessage,
branch: _branch,
deployedById: _deployedBy?.id,
deployedBy: _deployedBy,
stages: _stages
?.map(
(final e) => e.copyWith(
attemptId: _attemptId,
cloudCapsuleId: _cloudCapsuleId,
),
)
.toList(),
);
}