mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
Fix formatting.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from jinja2 import Template
|
||||
import jinja2 as j2
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
@@ -14,14 +14,16 @@ def find_all_scenarios():
|
||||
|
||||
|
||||
def load_template():
|
||||
path = Path(os.path.join(os.path.dirname(__file__), PIPELINE_TEMPLATE_J2_FILE))
|
||||
return Template(path.read_text())
|
||||
|
||||
jenv = j2.Environment(
|
||||
loader=j2.FileSystemLoader('.'),
|
||||
lstrip_blocks=True,
|
||||
trim_blocks=True)
|
||||
return jenv.get_template(PIPELINE_TEMPLATE_J2_FILE)
|
||||
|
||||
def main():
|
||||
template = load_template()
|
||||
|
||||
scenario_paths = find_all_scenarios()
|
||||
|
||||
template = load_template()
|
||||
generated_output = template.render(scenario_paths=scenario_paths)
|
||||
|
||||
print(generated_output)
|
||||
|
||||
Reference in New Issue
Block a user