Skip to content

Commit 3a85e11

Browse files
committed
app double check no pillar errors before moving on
1 parent 74950ef commit 3a85e11

5 files changed

Lines changed: 55 additions & 5 deletions

File tree

app/docker.sls

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
{% if pillar["app"] is defined and "docker" in pillar["app"] and "apps" in pillar["app"]["docker"] %}
1+
{% if pillar["_errors"] is defined %}
2+
docker_pillar_render_errors:
3+
test.configurable_test_state:
4+
- name: nothing_done
5+
- changes: False
6+
- result: False
7+
- comment: |
8+
ERROR: There are pillar errors, so nothing has been done.
9+
{{ pillar["_errors"] | json() }}
10+
11+
{% elif pillar["app"] is defined and "docker" in pillar["app"] and "apps" in pillar["app"]["docker"] %}
212

313
{%- set app_type = "docker" %} # required for _pkg.sls
414

app/php-fpm.sls

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
{% if pillar["app"] is defined and "php-fpm" in pillar["app"] and "apps" in pillar["app"]["php-fpm"] %}
1+
{% if pillar["_errors"] is defined %}
2+
app_php-fpm_pillar_render_errors:
3+
test.configurable_test_state:
4+
- name: nothing_done
5+
- changes: False
6+
- result: False
7+
- comment: |
8+
ERROR: There are pillar errors, so nothing has been done.
9+
{{ pillar["_errors"] | json() }}
10+
11+
{% elif pillar["app"] is defined and "php-fpm" in pillar["app"] and "apps" in pillar["app"]["php-fpm"] %}
212

313
{%- set app_type = "php-fpm" %}
414

app/python.sls

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
{% if pillar["app"] is defined and "python" in pillar["app"] and "apps" in pillar["app"]["python"] %}
1+
{% if pillar["_errors"] is defined %}
2+
app_python_pillar_render_errors:
3+
test.configurable_test_state:
4+
- name: nothing_done
5+
- changes: False
6+
- result: False
7+
- comment: |
8+
ERROR: There are pillar errors, so nothing has been done.
9+
{{ pillar["_errors"] | json() }}
10+
11+
{% elif pillar["app"] is defined and "python" in pillar["app"] and "apps" in pillar["app"]["python"] %}
212

313
{%- set app_type = "python" %}
414

app/ruby.sls

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
{% if pillar["app"] is defined and "ruby" in pillar["app"] and "apps" in pillar["app"]["ruby"] %}
1+
{% if pillar["_errors"] is defined %}
2+
app_ruby_pillar_render_errors:
3+
test.configurable_test_state:
4+
- name: nothing_done
5+
- changes: False
6+
- result: False
7+
- comment: |
8+
ERROR: There are pillar errors, so nothing has been done.
9+
{{ pillar["_errors"] | json() }}
10+
11+
{% elif pillar["app"] is defined and "ruby" in pillar["app"] and "apps" in pillar["app"]["ruby"] %}
212

313
{%- set app_type = "ruby" %}
414

app/static.sls

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
{% if pillar["app"] is defined and "static" in pillar["app"] and "apps" in pillar["app"]["static"] %}
1+
{% if pillar["_errors"] is defined %}
2+
app_static_pillar_render_errors:
3+
test.configurable_test_state:
4+
- name: nothing_done
5+
- changes: False
6+
- result: False
7+
- comment: |
8+
ERROR: There are pillar errors, so nothing has been done.
9+
{{ pillar["_errors"] | json() }}
10+
11+
{% elif pillar["app"] is defined and "static" in pillar["app"] and "apps" in pillar["app"]["static"] %}
212

313
{%- set app_type = "static" %}
414

0 commit comments

Comments
 (0)