fix: deployment should fail on error
This commit is contained in:
parent
91e4280f6b
commit
302f224bc0
2 changed files with 4 additions and 3 deletions
|
|
@ -71,6 +71,9 @@ public function __invoke(): ProcessResult
|
||||||
|
|
||||||
$this->activity->save();
|
$this->activity->save();
|
||||||
|
|
||||||
|
if ($processResult->exitCode() != 0 && $processResult->errorOutput()) {
|
||||||
|
throw new \RuntimeException('Remote command failed');
|
||||||
|
}
|
||||||
return $processResult;
|
return $processResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -279,15 +279,13 @@ private function executeNow(array|Collection $command, string $propertyName = nu
|
||||||
'hideFromOutput' => $hideFromOutput,
|
'hideFromOutput' => $hideFromOutput,
|
||||||
'setStatus' => $setStatus,
|
'setStatus' => $setStatus,
|
||||||
]);
|
]);
|
||||||
|
$result = $remoteProcess();
|
||||||
|
|
||||||
if ($propertyName) {
|
if ($propertyName) {
|
||||||
$result = $remoteProcess();
|
|
||||||
$this->activity->properties = $this->activity->properties->merge([
|
$this->activity->properties = $this->activity->properties->merge([
|
||||||
$propertyName => trim($result->output()),
|
$propertyName => trim($result->output()),
|
||||||
]);
|
]);
|
||||||
$this->activity->save();
|
$this->activity->save();
|
||||||
} else {
|
|
||||||
$remoteProcess();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private function gitImport()
|
private function gitImport()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue