Skip to content

Commit

Permalink
Fix extra vars issue (#54)
Browse files Browse the repository at this point in the history
* fix_missing_extra_vars

* fix: missing change

---------

Co-authored-by: Przemyslaw Kalitowski <[email protected]>
  • Loading branch information
przemkalit and Przemyslaw Kalitowski authored Jan 8, 2025
1 parent b07a669 commit 5ef726c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/filetree_create_missing_extra_vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- filetree_create is able to export empty extra vars of JT and WF
...
4 changes: 3 additions & 1 deletion roles/filetree_create/templates/controller_job_templates.j2
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ controller_templates:
{{ extra_vars_item.key }}: {{ (extra_vars_item.value | regex_replace("\n", "\\\\n") | regex_replace('"', '\\"')) | regex_replace('(^[^{]*){([{%])(.*)', '!unsafe "\\g<1>{\\g<2>\\g<3>"', multiline=True) }}
{% endif %}
{% endfor %}
{%- endif %}
{% else %}
extra_vars: ""
{% endif %}
job_tags: "{{ template_overrides_resources.job_template[current_job_templates_asset_value.name].job_tags
| default(template_overrides_global.job_template.job_tags)
| default(current_job_templates_asset_value.job_tags) }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ controller_workflows:
{{ extra_vars_item.key }}: {{ (extra_vars_item.value | regex_replace("\n", "\\\\n") | regex_replace('"', '\\"')) | regex_replace('(^[^{]*){([{%])(.*)', '!unsafe "\\g<1>{\\g<2>\\g<3>"', multiline=True) }}
{% endif %}
{% endfor %}
{%- endif %}
{% else %}
extra_vars: ""
{% endif %}
{% if query_labels | length > 0 %}
labels:
{% for label in query_labels %}
Expand Down

0 comments on commit 5ef726c

Please sign in to comment.