From 77558b37da31a6bc9854a66fb5a4abe43d39306b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 18 Jan 2024 11:40:13 +0100 Subject: [PATCH] refactor build server --- app/Livewire/Project/Application/General.php | 2 ++ app/Livewire/Project/Application/Heading.php | 2 +- .../project/application/advanced.blade.php | 3 --- .../project/application/general.blade.php | 18 ++++++++++++------ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php index 21608494a..2e02aac60 100644 --- a/app/Livewire/Project/Application/General.php +++ b/app/Livewire/Project/Application/General.php @@ -67,6 +67,7 @@ class General extends Component 'application.docker_compose_custom_start_command' => 'nullable', 'application.docker_compose_custom_build_command' => 'nullable', 'application.settings.is_raw_compose_deployment_enabled' => 'boolean|required', + 'application.settings.is_build_server_enabled' => 'boolean|required', ]; protected $validationAttributes = [ 'application.name' => 'name', @@ -100,6 +101,7 @@ class General extends Component 'application.docker_compose_custom_start_command' => 'Docker compose custom start command', 'application.docker_compose_custom_build_command' => 'Docker compose custom build command', 'application.settings.is_raw_compose_deployment_enabled' => 'Is raw compose deployment enabled', + 'application.settings.is_build_server_enabled' => 'Is build server enabled', ]; public function mount() { diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.php index 2dba750c8..95dcbdf73 100644 --- a/app/Livewire/Project/Application/Heading.php +++ b/app/Livewire/Project/Application/Heading.php @@ -78,7 +78,7 @@ class Heading extends Component return; } if (data_get($this->application, 'settings.is_build_server_enabled') && is_null($this->application->docker_registry_image_name)) { - $this->dispatch('error', 'To use a build server you must set a Docker image name first.
More information here: documentation'); + $this->dispatch('error', 'To use a build server you must set a Docker image name first.
More information here: documentation'); return; } $this->setDeploymentUuid(); diff --git a/resources/views/livewire/project/application/advanced.blade.php b/resources/views/livewire/project/application/advanced.blade.php index e376f0a72..29ebba166 100644 --- a/resources/views/livewire/project/application/advanced.blade.php +++ b/resources/views/livewire/project/application/advanced.blade.php @@ -6,9 +6,6 @@
Advanced configuration for your application.

General

- @if ($application->git_based()) diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 94a229f43..324a684a6 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -72,18 +72,20 @@
@endif @if ($application->build_pack !== 'dockercompose') -

Docker Registry

+
+

Docker Registry

+ @if ($application->build_pack !== 'dockerimage' && !$application->destination->server->isSwarm()) + + @endif +
@if ($application->destination->server->isSwarm()) @if ($application->build_pack !== 'dockerimage')
Docker Swarm requires the image to be available in a registry. More info here.
@endif - @else - @if ($application->build_pack !== 'dockerimage') -
Push the built image to a docker registry. More info here.
- @endif @endif
@if ($application->build_pack === 'dockerimage') @@ -160,6 +162,10 @@
@else +