From 8732c374a6c9c1676705230f8d4cc5278d0b406c Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 19 May 2023 15:02:52 +0200 Subject: [PATCH] Fix resource_path --- src/main/python/ddadevops/application/image_build_service.py | 4 ++-- src/main/python/ddadevops/infrastructure/infrastructure.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/python/ddadevops/application/image_build_service.py b/src/main/python/ddadevops/application/image_build_service.py index d191752..f3fa3f2 100644 --- a/src/main/python/ddadevops/application/image_build_service.py +++ b/src/main/python/ddadevops/application/image_build_service.py @@ -17,14 +17,14 @@ class ImageBuildService: ) def __copy_build_resource_file_from_package__(self, resource_name, devops: Devops): - data = self.resource_api.read_resource(f"main/resources/docker/{resource_name}") + data = self.resource_api.read_resource(f"src/main/resources/docker/{resource_name}") self.file_api.write_data_to_file( f"{devops.build_path()}/{resource_name}", data ) def __copy_build_resources_from_package__(self, devops: Devops): self.__copy_build_resource_file_from_package__( - "image/resources/install_functions.sh", devops.specialized_builds[BuildType.IMAGE] + "image/resources/install_functions.sh", devops ) def __copy_build_resources_from_dir__(self, devops: Devops): diff --git a/src/main/python/ddadevops/infrastructure/infrastructure.py b/src/main/python/ddadevops/infrastructure/infrastructure.py index 6333de1..55cc74a 100644 --- a/src/main/python/ddadevops/infrastructure/infrastructure.py +++ b/src/main/python/ddadevops/infrastructure/infrastructure.py @@ -9,7 +9,7 @@ from ..domain import Devops, Image, C4k, Release, BuildFile class ResourceApi: def read_resource(self, path: str) -> bytes: - return resource_string('src', path) + return resource_string('ddadevops', path) class FileApi: