Skip to content

Commit

Permalink
chore: debug list-images.sh script (#1980)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrabovcin authored Feb 27, 2024
1 parent b93d7e6 commit 7bf6fa3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
use asdf
# Automatically sets up your devbox environment whenever you cd into this
# directory via our direnv integration:

eval "$(devbox generate direnv --print-envrc)"

# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
# for more details
4 changes: 3 additions & 1 deletion hack/list-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ for dir in $(find . -type f -name "*.yaml" -print0 | xargs --null --max-lines=1
extra_args+=('--extra-images-file' 'extra-images.txt')
fi

>&2 echo -e " + ${dir}${hr}\n"
envsubst -no-unset -no-digit -i "$(basename "${hr}")" | \
gojq --yaml-input --raw-output --arg repoRoot "${REPO_ROOT}" \
$'select(.spec.chart.spec.sourceRef.name != null) |
Expand All @@ -116,7 +117,8 @@ for dir in $(find . -type f -name "*.yaml" -print0 | xargs --null --max-lines=1
elif .spec.chart.spec.sourceRef.kind == "GitRepository" then
$repoRoot+"/"+.spec.chart.spec.chart
end' | \
xargs --max-lines=1 --no-run-if-empty -- helm list-images --unique "${extra_args[@]}" >>"${IMAGES_FILE}"
xargs --max-lines=1 --no-run-if-empty -- helm list-images --unique "${extra_args[@]}" | >&2 tee -a "${IMAGES_FILE}"
>&2 echo
popd &>/dev/null
done < <(grep --recursive --max-count=1 --files-with-matches '^kind: HelmRelease')
popd &>/dev/null
Expand Down

0 comments on commit 7bf6fa3

Please sign in to comment.