fetchDeploymentStatus static method
Future<Map<String, Object?> >
fetchDeploymentStatus(
- Client cloudApiClient, {
- required String baseCommand,
- required String projectId,
- CommandNames commandNames = CommandNames.public,
- String? deploymentArg,
Implementation
static Future<Map<String, Object?>> fetchDeploymentStatus(
final Client cloudApiClient, {
required final String baseCommand,
required final String projectId,
final CommandNames commandNames = CommandNames.public,
final String? deploymentArg,
}) async {
try {
final attemptId = await getDeployAttemptId(
cloudApiClient,
baseCommand: baseCommand,
commandNames: commandNames,
projectId: projectId,
deploymentArg: deploymentArg,
);
final snapshot = await StatusCommands.fetchDeployAttemptStatus(
cloudApiClient,
cloudCapsuleId: projectId,
attemptId: attemptId,
);
return {
'projectId': projectId,
'attemptId': attemptId,
'startedAt': snapshot.startedAt,
'stages': snapshot.stages,
};
} on FailureException {
rethrow;
} on Exception catch (e, s) {
throw FailureException.nested(e, s, 'Failed to get deployment status');
}
}