diff --git a/app/Commands/DockerBuildCommand.php b/app/Commands/DockerBuildCommand.php index 59e718b..8a290e1 100644 --- a/app/Commands/DockerBuildCommand.php +++ b/app/Commands/DockerBuildCommand.php @@ -69,6 +69,9 @@ public function handle() $this->line("Building docker images for all services with tag {$tag}"); if ($this->callBuild($tag)) { return $this->info("Docker images built."); + } else { + $this->error("Docker images failed to build."); + return 1; } } diff --git a/app/Commands/DockerPushCommand.php b/app/Commands/DockerPushCommand.php index 8784d90..0f72e28 100644 --- a/app/Commands/DockerPushCommand.php +++ b/app/Commands/DockerPushCommand.php @@ -65,7 +65,10 @@ public function handle() if (count($services) == 0) { // Generic full file build as we have no services $this->line("Pushing docker images for all services with tags " . implode(', ', $tags)); - $this->callPush($tags); + if (!$this->callPush($tags)) { + $this->error("Unable to push images."); + return 1; + } } else { // We've been provided services, we'll run the command for each $this->line(sprintf( @@ -89,7 +92,7 @@ protected function callPush(array $tags, string $service = null): bool // We need to make the new tags first $sourceTag = $this->helpers->docker()->prefixedTag(); if (!$this->helpers->docker()->tagImages($service, $sourceTag, $tags)) { - return 1; + return false; } foreach ($tags as $tag) {