fix: only require registry image in case of dockerimage bp

This commit is contained in:
Andras Bacsai 2023-10-11 12:10:40 +02:00
parent 9540f60fa2
commit 5a4c9422b2
2 changed files with 8 additions and 2 deletions

View File

@ -125,6 +125,12 @@ public function submit()
{ {
try { try {
$this->validate(); $this->validate();
if (data_get($this->application,'build_pack') === 'dockerimage') {
$this->validate([
'application.docker_registry_image_name' => 'required',
'application.docker_registry_image_tag' => 'required',
]);
}
if (data_get($this->application, 'fqdn')) { if (data_get($this->application, 'fqdn')) {
$domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) { $domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) {
return Str::of($domain)->trim()->lower(); return Str::of($domain)->trim()->lower();

View File

@ -73,8 +73,8 @@
</div> </div>
@else @else
<div class="flex flex-col gap-2 xl:flex-row"> <div class="flex flex-col gap-2 xl:flex-row">
<x-forms.input id="application.docker_registry_image_name" required label="Docker Image" /> <x-forms.input id="application.docker_registry_image_name" label="Docker Image" />
<x-forms.input id="application.docker_registry_image_tag" required label="Docker Image Tag" /> <x-forms.input id="application.docker_registry_image_tag" label="Docker Image Tag" />
</div> </div>
@endif @endif