Skip to content

Commit

Permalink
fix(kitchen): use namespace for prev_comment in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Dec 8, 2019
1 parent 6f59e85 commit 3ea50d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssf/files/default/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ driver:
# the `env.matrix` instances defined in `.travis.yml`
platforms:
{#- Centralise duplication from here and `libcimatrix.jinja` #}
{%- set prev_comment = '' %}
{%- set ns_platforms = namespace(prev_comment='') %}
{%- for platform in platforms %}
{%- set os = platform[0] %}
{%- set os_ver = platform[1] %}
Expand All @@ -146,9 +146,9 @@ platforms:
{%- if loop.index0 == 0 %}
{%- set linebreak = '' %}
{%- endif %}
{%- if prev_comment != comment %}
{%- if ns_platforms.prev_comment != comment %}
{{ linebreak }} ## SALT {{ comment }}
{%- set prev_comment = comment %}
{%- set ns_platforms.prev_comment = comment %}
{%- endif %}
{#- TODO: Should really do this `if` from `defaults.yaml` or `formulas.yaml`, just speeding things up right now #}
{%- if os == 'centos' and os_ver == 6 and semrel_formula == 'libvirt' %}
Expand Down

0 comments on commit 3ea50d3

Please sign in to comment.