diff --git a/src/main/python/ddadevops/domain/common.py b/src/main/python/ddadevops/domain/common.py index c322845..be43a01 100644 --- a/src/main/python/ddadevops/domain/common.py +++ b/src/main/python/ddadevops/domain/common.py @@ -1,4 +1,5 @@ import deprecation +import logging from typing import List def filter_none(list_to_filter): @@ -35,11 +36,12 @@ class DnsRecord(Validateable): class Devops(Validateable): def __init__( - self, stage, project_root_path, module, name=None, build_dir_name="target" + self, stage: str, project_root_path: str, module: str, name: str | None =None, build_dir_name: str="target" ): self.stage = stage self.name = name self.project_root_path = project_root_path + logging.warn(f"Set project root in DevOps {self.project_root_path}") self.module = module if not name: self.name = module @@ -54,6 +56,7 @@ class Devops(Validateable): def build_path(self): path = [self.project_root_path, self.build_dir_name, self.name, self.module] + logging.warn(f"Set project build_path in Devops {path}") return "/".join(filter_none(path)) def __put__(self, key, value): diff --git a/src/test/python/test_image_build.py b/src/test/python/test_image_build.py index 666c0bc..ff8f9cf 100644 --- a/src/test/python/test_image_build.py +++ b/src/test/python/test_image_build.py @@ -16,9 +16,10 @@ def test_devops_docker_build(tmp_path): project_root_path=tmp_path_str, module=module_name, name=project_name, + build_dir_name=build_dir ) image = Image(dockerhub_user="user", dockerhub_password="password", devops=devops) docker_build = DevopsImageBuild(project, image=image) - # docker_build.initialize_build_dir() - # assert os.path.exists(f"{docker_build.build_path()}") + docker_build.initialize_build_dir() + assert os.path.exists(f"{docker_build.build_path()}")