Skip to content

Commit

Permalink
Update tools/get-images.sh to capture images properly (#193)
Browse files Browse the repository at this point in the history
* Update tools/get-images.sh to capture images properly

* Update tools/get-images.sh to match the logic found in other charm repos

* Update tools/get-images.sh to work in both Go and Python versions of yq

* Add set -xe to get-images.sh
  • Loading branch information
mvlassis authored Aug 30, 2024
1 parent fcb9b75 commit 9659c35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/get-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# This script returns list of container images that are managed by this charm and/or its workload
#
# dynamic list

set -xe

IMAGE_LIST=()
IMAGE_LIST+=($(find -type f -name metadata.yaml -exec yq '.resources | to_entries | .[] | .value | ."upstream-source"' {} \;))
IMAGE_LIST+=($(find -type f -name config.yaml -exec yq '.options | with_entries(select(.key | test("-image$"))) | .[].default' {} \; | tr -d '"'))
printf "%s\n" "${IMAGE_LIST[@]}"

0 comments on commit 9659c35

Please sign in to comment.