Skip to content

Commit

Permalink
move logic to build-charts.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasferrandiz committed Sep 29, 2023
1 parent 1230069 commit cac6b3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions charts/build-charts.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cac6b3d

Please sign in to comment.