From 4cef054b3536752de8e7663eb094e872e5d435a5 Mon Sep 17 00:00:00 2001 From: i-chvets <113444075+i-chvets@users.noreply.github.com> Date: Sat, 2 Sep 2023 14:20:22 -0400 Subject: [PATCH] feat: get images on main (#79) * feat: get images on main https://github.com/canonical/bundle-kubeflow/issues/679 Summary of changes: - Added script that produces list of container images managed by charm in this repository. Image list is a dynamic list. - Update tools/get-images.sh --------- Co-authored-by: Phoevos Kalemkeris --- tools/get-images-1.7-stable.sh | 14 -------------- tools/get-images.sh | 3 +-- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100755 tools/get-images-1.7-stable.sh diff --git a/tools/get-images-1.7-stable.sh b/tools/get-images-1.7-stable.sh deleted file mode 100755 index 6da4948..0000000 --- a/tools/get-images-1.7-stable.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# -# This script returns list of container images that are managed by this charm and/or its workload -# -# static list -STATIC_IMAGE_LIST=( -) -# dynamic list -git checkout origin/track/2.0 -IMAGE_LIST=() -IMAGE_LIST+=($(grep "self._metacontroller_image =" src/charm.py | awk '{print $3}' | sort --unique | sed s/,//g | sed s/\"//g)) - -printf "%s\n" "${STATIC_IMAGE_LIST[@]}" -printf "%s\n" "${IMAGE_LIST[@]}" diff --git a/tools/get-images.sh b/tools/get-images.sh index 0cbea69..08522eb 100644 --- a/tools/get-images.sh +++ b/tools/get-images.sh @@ -4,6 +4,5 @@ # # dynamic list IMAGE_LIST=() -IMAGE_LIST+=($(grep "self._metacontroller_image =" src/charm.py | awk '{print $3}' | sort --unique | sed s/,//g | sed s/\"//g)) +IMAGE_LIST+=($(find -type f -name metadata.yaml -exec yq '.resources | to_entries | .[] | .value | ."upstream-source"' {} \;)) printf "%s\n" "${IMAGE_LIST[@]}" -