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:
@@ -346,7 +346,6 @@ pipelines:
|
|||||||
- cd roles/restore_backups
|
- cd roles/restore_backups
|
||||||
- pipenv run molecule test -s restore_jira_clustered
|
- pipenv run molecule test -s restore_jira_clustered
|
||||||
|
|
||||||
|
|
||||||
- step:
|
- step:
|
||||||
name: Run Snyk security scan
|
name: Run Snyk security scan
|
||||||
services:
|
services:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from jinja2 import Template
|
import jinja2 as j2
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@@ -14,14 +14,16 @@ def find_all_scenarios():
|
|||||||
|
|
||||||
|
|
||||||
def load_template():
|
def load_template():
|
||||||
path = Path(os.path.join(os.path.dirname(__file__), PIPELINE_TEMPLATE_J2_FILE))
|
jenv = j2.Environment(
|
||||||
return Template(path.read_text())
|
loader=j2.FileSystemLoader('.'),
|
||||||
|
lstrip_blocks=True,
|
||||||
|
trim_blocks=True)
|
||||||
|
return jenv.get_template(PIPELINE_TEMPLATE_J2_FILE)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
template = load_template()
|
|
||||||
|
|
||||||
scenario_paths = find_all_scenarios()
|
scenario_paths = find_all_scenarios()
|
||||||
|
|
||||||
|
template = load_template()
|
||||||
generated_output = template.render(scenario_paths=scenario_paths)
|
generated_output = template.render(scenario_paths=scenario_paths)
|
||||||
|
|
||||||
print(generated_output)
|
print(generated_output)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ pipelines:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- parallel:
|
- parallel:
|
||||||
{% for spath in scenario_paths -%}
|
{% for spath in scenario_paths %}
|
||||||
- step:
|
- step:
|
||||||
name: {{ spath.parts[2] }}/{{ spath.parts[4] }}
|
name: {{ spath.parts[2] }}/{{ spath.parts[4] }}
|
||||||
services:
|
services:
|
||||||
|
|||||||
Reference in New Issue
Block a user