EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 77fa6d3a authored by Bernhard Mallinger's avatar Bernhard Mallinger
Browse files

Write env-specific output directories

parent 1b4f7b3f
Branches
Tags
1 merge request!1Remove base and logging conf from vs-starter
......@@ -30,7 +30,9 @@ def render_config(
# create folder with name of slug at path
slug = params["slug"]
destination = prepare_directory(output_path, slug)
destination = prepare_directory(
output_path, slug, environment=params["environment"]
)
# create necessary configs and store at appropriate path
create_configurations(destination, mapping)
......@@ -83,9 +85,9 @@ def prepare_configs(configmaps: List[str]) -> Dict[str, str]:
return file_config_mapping
def prepare_directory(output_path: str, slug: str) -> str:
def prepare_directory(output_path: str, slug: str, environment: str) -> str:
if os.path.isdir(output_path):
destination = os.path.join(output_path, slug)
destination = os.path.join(output_path, f"{slug}-{environment}")
try:
os.mkdir(destination)
except FileExistsError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment