diff --git a/Dockerfile b/Dockerfile index 6ee368ee326..0ad7189f617 100644 --- a/Dockerfile +++ b/Dockerfile @@ -106,13 +106,7 @@ ARG KUBERNETES_VERSION="" ARG CACHEBUST="cachebust" COPY charts/ /charts/ RUN echo ${CACHEBUST}>/dev/null -RUN readarray charts < <(yq e -o=j -I=0 '.charts[]' charts/chart_versions.yaml ) \ - for chart in "${charts[@]}"; do \ - version=$(echo "$chart" | yq e '.version' -) \ - filename=$(echo "$chart" | yq e '.filename' -) \ - bootstrap=$(echo "$chart" | yq e '.bootstrap' -) \ - CHART_VERSION=$version CHART_FILE=$filename CHART_BOOTSTRAP=$bootstrap /charts/build-chart.sh; \ - done +RUN /charts/build-charts.sh RUN rm -vf /charts/*.sh /charts/*.md diff --git a/charts/build-charts.sh b/charts/build-charts.sh new file mode 100755 index 00000000000..41fff86aafd --- /dev/null +++ b/charts/build-charts.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -eux -o pipefail + +readarray charts < <(yq e -o=j -I=0 '.charts[]' charts/chart_versions.yaml ) +for chart in "${charts[@]}"; do + version=$(echo "$chart" | yq e '.version' -) + filename=$(echo "$chart" | yq e '.filename' -) + bootstrap=$(echo "$chart" | yq e '.bootstrap' -) + + CHART_VERSION=$version CHART_FILE=$filename CHART_BOOTSTRAP=$bootstrap /charts/build-chart.sh +done