validate-indentation: expand check to also catch macros.install_packages

Fixed up 4 Dockerfile.j2 files that had the issue

Change-Id: I8a5551050a75d64712c36d53573437a18777a82f
(cherry picked from commit 2b023ba13e)
This commit is contained in:
Jon Schlueter 2018-07-26 14:50:39 -04:00
parent b15a58ce9b
commit b5563c17fa
5 changed files with 11 additions and 5 deletions

View File

@ -8,7 +8,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set mistral_event_engine_packages = ['openstack-mistral-event-engine'] %}
{{ macros.install_packages(mistral_event_engine_packages | customizable("packages")) }}
{{ macros.install_packages(mistral_event_engine_packages | customizable("packages")) }}
{% elif base_distro in ['debian', 'ubuntu'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false

View File

@ -21,7 +21,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
{% endif %}
{{ macros.install_packages(ironic_neutron_agent_packages | customizable("packages")) }}
{{ macros.install_packages(ironic_neutron_agent_packages | customizable("packages")) }}
{% endif %}

View File

@ -17,7 +17,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{% endif %}
{{ macros.install_packages(neutron_metadata_agent_ovn_packages | customizable("packages")) }}
{{ macros.install_packages(neutron_metadata_agent_ovn_packages | customizable("packages")) }}
{% elif install_type == 'source' %}

View File

@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{{ macros.install_packages(tripleo_ui_packages | customizable("packages")) }}
{{ macros.install_packages(tripleo_ui_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
@ -34,7 +34,7 @@ RUN echo 'tripleo-ui not yet available for {{ base_distro }}' && /bin/false
] %}
{{ macros.install_packages(tripleo_ui_packages | customizable("packages")) }}
{{ macros.install_packages(tripleo_ui_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf

View File

@ -8,6 +8,12 @@ for dockerfile in "$@"; do
grep -E '^\s+[[:upper:]]+\s+' "$dockerfile"
RES=1
fi
if grep -qE '^\s+\{\{ macros\.install_packages' "$dockerfile"; then
echo "ERROR: $dockerfile has indented Dockerfile instruction" >&2
grep -E '^\s+\{\{ macros\.install_packages' "$dockerfile"
RES=1
fi
done
exit $RES