fail properly

This commit is contained in:
2025-03-31 16:25:14 +00:00
parent 291b45fc67
commit 7cd771ad13

View File

@@ -37,7 +37,17 @@ class RunStep implements ShouldQueue
]);
});
$ssh->execute($this->step->script);
$result = $ssh->execute($this->step->script);
if (! $result->isSuccessful()) {
$this->step->update([
'status' => DeploymentStatus::FAILED,
'finished_at' => now(),
'logs' => $this->step->logs . "\n" . trim($result->getErrorOutput()),
]);
return;
}
$this->step->update([
'status' => DeploymentStatus::COMPLETED,