From 7c91c690cfc4c22adfb8b085d15c0d85f68d78c3 Mon Sep 17 00:00:00 2001 From: i-chvets <113444075+i-chvets@users.noreply.github.com> Date: Sat, 2 Sep 2023 12:10:07 -0400 Subject: [PATCH] feat: get images on main (#289) 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. Co-authored-by: Phoevos Kalemkeris --- tools/get-images-1.7-stable.sh | 17 ----------------- tools/get-images.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 17 deletions(-) delete mode 100755 tools/get-images-1.7-stable.sh create mode 100755 tools/get-images.sh diff --git a/tools/get-images-1.7-stable.sh b/tools/get-images-1.7-stable.sh deleted file mode 100755 index 6d9d7bab..00000000 --- a/tools/get-images-1.7-stable.sh +++ /dev/null @@ -1,17 +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/1.7 -IMAGE_LIST=() -IMAGE_LIST+=($(find $REPO -type f -name metadata.yaml -exec yq '.resources | to_entries | .[] | .value | ."upstream-source"' {} \;)) -IMAGE_LIST+=($(yq '.spawnerFormDefaults | .image | .options | .[]' charms/jupyter-ui/src/spawner_ui_config.yaml)) -IMAGE_LIST+=($(yq '.spawnerFormDefaults | .imageGroupOne | .options | .[]' charms/jupyter-ui/src/spawner_ui_config.yaml)) -IMAGE_LIST+=($(yq '.spawnerFormDefaults | .imageGroupTwo | .options | .[]' charms/jupyter-ui/src/spawner_ui_config.yaml)) - -printf "%s\n" "${STATIC_IMAGE_LIST[@]}" -printf "%s\n" "${IMAGE_LIST[@]}" diff --git a/tools/get-images.sh b/tools/get-images.sh new file mode 100755 index 00000000..283f9728 --- /dev/null +++ b/tools/get-images.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# This script returns list of container images that are managed by this charm and/or its workload +# +# dynamic list +IMAGE_LIST=() +IMAGE_LIST+=($(find . -type f -name metadata.yaml -exec yq '.resources | to_entries | .[] | .value | ."upstream-source"' {} \;)) +IMAGE_LIST+=($(yq '.options | .jupyter-images | .default' charms/jupyter-ui/config.yaml | yq '.[]')) +IMAGE_LIST+=($(yq '.options | .rstudio-images | .default' charms/jupyter-ui/config.yaml | yq '.[]')) +IMAGE_LIST+=($(yq '.options | .vscode-images | .default' charms/jupyter-ui/config.yaml | yq '.[]')) +printf "%s\n" "${IMAGE_LIST[@]}" +