From 29c75384e885f7413aef9ae4a02efe3658e74c08 Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Sat, 15 Jun 2024 20:56:06 +0200 Subject: [PATCH] [GHA] fix the missing habana image update record for the digest updater Example of the wrong update is #565, where it had to be updated manually, see the be022e2096e7213d69e43bb3f7caec2c4245cf1d. --- .../notebooks-digest-updater-upstream.yaml | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/notebooks-digest-updater-upstream.yaml b/.github/workflows/notebooks-digest-updater-upstream.yaml index 74c95ecfd..415ddee1c 100644 --- a/.github/workflows/notebooks-digest-updater-upstream.yaml +++ b/.github/workflows/notebooks-digest-updater-upstream.yaml @@ -68,19 +68,10 @@ jobs: - name: Update the param.env file run: | echo Latest commit is: ${{ steps.hash-n.outputs.HASH_N }} on ${{ env.RELEASE_VERSION_N}} - IMAGES=("odh-minimal-notebook-image-n" - "odh-minimal-gpu-notebook-image-n" - "odh-pytorch-gpu-notebook-image-n" - "odh-generic-data-science-notebook-image-n" - "odh-tensorflow-gpu-notebook-image-n" - "odh-trustyai-notebook-image-n" - "odh-codeserver-notebook-image-n" - "odh-rstudio-notebook-image-n" - "odh-rstudio-gpu-notebook-image-n") - - for ((i=0;i<${#IMAGES[@]};++i)); do - image=${IMAGES[$i]} - echo "CHECKING: " $image + IMAGES=$(cat manifests/base/params.env | grep "\-n=" | cut -d "=" -f 1) + + for image in ${IMAGES}; do + echo "CHECKING: '${image}'" img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2) registry=$(echo $img | cut -d '@' -f1) src_tag=$(skopeo inspect docker://$img | jq '.Env[] | select(startswith("OPENSHIFT_BUILD_NAME=")) | split("=")[1]' | tr -d '"' | sed 's/-amd64$//') @@ -148,19 +139,10 @@ jobs: - name: Update the param.env file run: | echo Latest commit is: ${{ steps.hash-n-1.outputs.HASH_N_1 }} on ${{ env.RELEASE_VERSION_N_1}} - IMAGES=("odh-minimal-notebook-image-n-1" - "odh-minimal-gpu-notebook-image-n-1" - "odh-pytorch-gpu-notebook-image-n-1" - "odh-generic-data-science-notebook-image-n-1" - "odh-tensorflow-gpu-notebook-image-n-1" - "odh-trustyai-notebook-image-n-1" - "odh-codeserver-notebook-image-n-1" - "odh-rstudio-notebook-image-n-1" - "odh-rstudio-gpu-notebook-image-n-1") - - for ((i=0;i<${#IMAGES[@]};++i)); do - image=${IMAGES[$i]} - echo "CHECKING: " $image + IMAGES=$(cat manifests/base/params.env | grep "\-n-1=" | cut -d "=" -f 1) + + for image in ${IMAGES}; do + echo "CHECKING: '${image}'" img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2) registry=$(echo $img | cut -d '@' -f1) src_tag=$(skopeo inspect docker://$img | jq '.Env[] | select(startswith("OPENSHIFT_BUILD_NAME=")) | split("=")[1]' | tr -d '"' | sed 's/-amd64$//')