From 906b4ce158e0dd124f453d3f3cab9ed908c3c060 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 3 May 2023 11:30:58 +0200 Subject: [PATCH] fail the job manually --- app/Jobs/DeployApplicationJob.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/DeployApplicationJob.php b/app/Jobs/DeployApplicationJob.php index 501f45039..5eb1f5f75 100644 --- a/app/Jobs/DeployApplicationJob.php +++ b/app/Jobs/DeployApplicationJob.php @@ -222,10 +222,10 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap Storage::disk('deployments')->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose); } catch (\Exception $e) { $this->executeNow([ - "echo 'Oops something is not okay, are you okay? 😢'", + "echo '\nOops something is not okay, are you okay? 😢'", "echo '\n\n{$e->getMessage()}'", ]); - throw new \Exception('Deployment finished'); + $this->fail($e->getMessage()); } finally { $this->executeNow(["docker rm -f {$this->deployment_uuid} >/dev/null 2>&1"], hideFromOutput: true); dispatch(new ContainerStatusJob($this->application_uuid));