Skip to content

Commit

Permalink
feat: cleaning the manifest output a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemontoya committed Jun 28, 2022
1 parent c5d1d6a commit aa19367
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drydock/manifest_builder/infrastructure/flex_tutor_manifest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import pkg_resources
import shutil

from abc import abstractmethod
from drydock.manifest_builder.domain.config import DrydockConfig
Expand Down Expand Up @@ -31,6 +32,10 @@ def my_base_dir(root):
tutor_env.base_dir = my_base_dir
tutor_env.save(None, env)

# Delete tutor env files that are not related to the k8s manifest
for path in ["dev", "build", "local"]:
shutil.rmtree(os.path.join(fixed_root, path))

hooks.filters.clear("env:templates:targets")
hooks.filters.add_items(
"env:templates:targets",
Expand All @@ -47,3 +52,9 @@ def my_base_dir(root):
)

tutor_env.save(None, env)

src_path = os.path.join(fixed_root, self.options.get("tutor_templates_version"))
dst_path = os.path.join(fixed_root)
shutil.copytree(src_path, dst_path, dirs_exist_ok=True)
shutil.rmtree(src_path)

0 comments on commit aa19367

Please sign in to comment.