Merge "Validate Dockerfile indentation in pep8"
This commit is contained in:
commit
b1796384f7
@ -46,12 +46,12 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
|
||||
RUN {{ macros.install_pip(helm_repository_pip_packages | customizable("pip_packages"), constraints = false) }}
|
||||
|
||||
ENV helm_arch={{ base_arch }}
|
||||
|
||||
{% if base_arch == 'x86_64' %}
|
||||
ENV helm_arch=amd64
|
||||
ENV helm_arch=amd64
|
||||
{% elif base_arch == 'aarch64' %}
|
||||
ENV helm_arch=arm64
|
||||
ENV helm_arch=arm64
|
||||
{% else %}
|
||||
ENV helm_arch={{ base_arch }}
|
||||
{% endif %}
|
||||
|
||||
{% block helm_repository_install_kubernetes_helm %}
|
||||
|
@ -16,7 +16,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
] %}
|
||||
|
||||
{% if base_arch == 'aarch64' %}
|
||||
ENV ironic_arch=aarch64
|
||||
ENV ironic_arch=aarch64
|
||||
{% set ironic_pxe_packages = ironic_pxe_packages + [
|
||||
'grub2-efi',
|
||||
'grub2-efi-aa64-modules'
|
||||
@ -41,7 +41,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
|
||||
'syslinux'
|
||||
] %}
|
||||
{% elif base_arch == 'aarch64' %}
|
||||
ENV ironic_arch=aarch64
|
||||
ENV ironic_arch=aarch64
|
||||
{% set ironic_pxe_packages = ironic_pxe_packages + [
|
||||
'grub-efi-arm64'
|
||||
] %}
|
||||
|
@ -3,9 +3,15 @@
|
||||
REAL_PATH=$(python -c "import os,sys;print(os.path.realpath('$0'))")
|
||||
cd "$(dirname "$REAL_PATH")/.."
|
||||
|
||||
find docker -name Dockerfile.j2 -print0 |
|
||||
xargs -0 tools/validate-maintainer.sh || exit 1
|
||||
RES=0
|
||||
|
||||
find docker -name Dockerfile.j2 -print0 |
|
||||
xargs -0 tools/validate-install-command.sh || exit 1
|
||||
xargs -0 tools/validate-maintainer.sh || RES=1
|
||||
|
||||
find docker -name Dockerfile.j2 -print0 |
|
||||
xargs -0 tools/validate-install-command.sh || RES=1
|
||||
|
||||
find docker -name Dockerfile.j2 -print0 |
|
||||
xargs -0 tools/validate-indentation.sh || RES=1
|
||||
|
||||
exit $RES
|
||||
|
12
tools/validate-indentation.sh
Executable file
12
tools/validate-indentation.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
RES=0
|
||||
|
||||
for dockerfile in "$@"; do
|
||||
if grep -qE '^\s+[A-Z]+\s' "$dockerfile"; then
|
||||
echo "ERROR: $dockerfile has indented Dockerfile instruction" >&2
|
||||
RES=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RES
|
Loading…
Reference in New Issue
Block a user