mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
Fix formatting.
This commit is contained in:
@@ -346,7 +346,6 @@ pipelines:
|
||||
- cd roles/restore_backups
|
||||
- pipenv run molecule test -s restore_jira_clustered
|
||||
|
||||
|
||||
- step:
|
||||
name: Run Snyk security scan
|
||||
services:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -33,7 +33,7 @@ pipelines:
|
||||
fi
|
||||
|
||||
- parallel:
|
||||
{% for spath in scenario_paths -%}
|
||||
{% for spath in scenario_paths %}
|
||||
- step:
|
||||
name: {{ spath.parts[2] }}/{{ spath.parts[4] }}
|
||||
services:
|
||||
|
||||
Reference in New Issue
Block a user