EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vs-starter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Data Handling
vs-starter
Commits
77fa6d3a
Commit
77fa6d3a
authored
3 years ago
by
Bernhard Mallinger
Browse files
Options
Downloads
Patches
Plain Diff
Write env-specific output directories
parent
1b4f7b3f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Remove base and logging conf from vs-starter
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vs_starter/config.py
+5
-3
5 additions, 3 deletions
vs_starter/config.py
with
5 additions
and
3 deletions
vs_starter/config.py
+
5
−
3
View file @
77fa6d3a
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment