Skip to content

Commit

Permalink
use charts_versions.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasferrandiz committed Sep 28, 2023
1 parent ed90130 commit 19cebb8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ ARG KUBERNETES_VERSION=""
ARG CACHEBUST="cachebust"
COPY charts/ /charts/
RUN echo ${CACHEBUST}>/dev/null
COPY chart_versions.csv /charts/chart_versions.csv
RUN while IFS="," read -r version filename bootstrap; do \
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 < /charts/chart_versions.csv
done


RUN rm -vf /charts/*.sh /charts/*.md
Expand Down
11 changes: 8 additions & 3 deletions scripts/validate-charts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ check_airgap() {
declare -A NO_SYSTEM_REGISTRY
declare -A NOT_FOUND

while IFS="," read -r version filename bootstrap
do

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_name=$(basename "${filename%%.yaml}")
chart_tmp=$(download_chart $version $chart_name $bootstrap)

Expand All @@ -111,7 +116,7 @@ do
if ! [ -z "$not_found" ]; then
NOT_FOUND[$chart_name]=$not_found
fi
done < chart_versions.csv
done

failed=0

Expand Down

0 comments on commit 19cebb8

Please sign in to comment.