From e6566d8be3e46a69101e02648addc50b313ccf02 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 10 Oct 2024 11:46:41 +0200 Subject: [PATCH] fix: new parser with SERVICE_URL_ envs --- bootstrap/helpers/constants.php | 1 + bootstrap/helpers/shared.php | 1 + tests/Feature/DockerComposeParseTest.php | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap/helpers/constants.php b/bootstrap/helpers/constants.php index d8dc26a48..303fcab8e 100644 --- a/bootstrap/helpers/constants.php +++ b/bootstrap/helpers/constants.php @@ -40,6 +40,7 @@ const DATABASE_DOCKER_IMAGES = [ ]; const SPECIFIC_SERVICES = [ 'quay.io/minio/minio', + 'minio/minio', 'svhd/logto', ]; diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 151e15c91..f8bd1ffbd 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -3181,6 +3181,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int } elseif ($isService) { $fqdn = generateFqdn($server, "$fqdnFor-$uuid"); } + $fqdn = str($fqdn)->replace('http://', '')->replace('https://', ''); $resource->environment_variables()->where('key', $key->value())->where($nameOfId, $resource->id)->firstOrCreate([ 'key' => $key->value(), $nameOfId => $resource->id, diff --git a/tests/Feature/DockerComposeParseTest.php b/tests/Feature/DockerComposeParseTest.php index 7376c3e66..daaa8b2f1 100644 --- a/tests/Feature/DockerComposeParseTest.php +++ b/tests/Feature/DockerComposeParseTest.php @@ -1,10 +1,9 @@ applicationPreview->forceDelete(); $this->application->forceDelete(); - DeleteService::run($this->service); + DeleteResourceJob::dispatchSync($this->service); $this->service->forceDelete(); });