[Skip CI] Uncomment assertion in test_image_build
Add logging.
This commit is contained in:
parent
580bf81c15
commit
381baa2eb2
2 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
import deprecation
|
import deprecation
|
||||||
|
import logging
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
def filter_none(list_to_filter):
|
def filter_none(list_to_filter):
|
||||||
|
@ -35,11 +36,12 @@ class DnsRecord(Validateable):
|
||||||
|
|
||||||
class Devops(Validateable):
|
class Devops(Validateable):
|
||||||
def __init__(
|
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.stage = stage
|
||||||
self.name = name
|
self.name = name
|
||||||
self.project_root_path = project_root_path
|
self.project_root_path = project_root_path
|
||||||
|
logging.warn(f"Set project root in DevOps {self.project_root_path}")
|
||||||
self.module = module
|
self.module = module
|
||||||
if not name:
|
if not name:
|
||||||
self.name = module
|
self.name = module
|
||||||
|
@ -54,6 +56,7 @@ class Devops(Validateable):
|
||||||
|
|
||||||
def build_path(self):
|
def build_path(self):
|
||||||
path = [self.project_root_path, self.build_dir_name, self.name, self.module]
|
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))
|
return "/".join(filter_none(path))
|
||||||
|
|
||||||
def __put__(self, key, value):
|
def __put__(self, key, value):
|
||||||
|
|
|
@ -16,9 +16,10 @@ def test_devops_docker_build(tmp_path):
|
||||||
project_root_path=tmp_path_str,
|
project_root_path=tmp_path_str,
|
||||||
module=module_name,
|
module=module_name,
|
||||||
name=project_name,
|
name=project_name,
|
||||||
|
build_dir_name=build_dir
|
||||||
)
|
)
|
||||||
image = Image(dockerhub_user="user", dockerhub_password="password", devops=devops)
|
image = Image(dockerhub_user="user", dockerhub_password="password", devops=devops)
|
||||||
|
|
||||||
docker_build = DevopsImageBuild(project, image=image)
|
docker_build = DevopsImageBuild(project, image=image)
|
||||||
# docker_build.initialize_build_dir()
|
docker_build.initialize_build_dir()
|
||||||
# assert os.path.exists(f"{docker_build.build_path()}")
|
assert os.path.exists(f"{docker_build.build_path()}")
|
||||||
|
|
Loading…
Reference in a new issue