Skip to content

Commit e7db0aa

Browse files
committed
[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 be022e2.
1 parent bc0a54f commit e7db0aa

File tree

1 file changed

+16
-48
lines changed

1 file changed

+16
-48
lines changed

.github/workflows/notebooks-digest-updater-upstream.yaml

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,10 @@ jobs:
6868
- name: Update the param.env file
6969
run: |
7070
echo Latest commit is: ${{ steps.hash-n.outputs.HASH_N }} on ${{ env.RELEASE_VERSION_N}}
71-
IMAGES=("odh-minimal-notebook-image-n"
72-
"odh-minimal-gpu-notebook-image-n"
73-
"odh-pytorch-gpu-notebook-image-n"
74-
"odh-generic-data-science-notebook-image-n"
75-
"odh-tensorflow-gpu-notebook-image-n"
76-
"odh-trustyai-notebook-image-n"
77-
"odh-codeserver-notebook-image-n"
78-
"odh-rstudio-notebook-image-n"
79-
"odh-rstudio-gpu-notebook-image-n")
80-
81-
for ((i=0;i<${#IMAGES[@]};++i)); do
82-
image=${IMAGES[$i]}
83-
echo "CHECKING: " $image
71+
IMAGES=$(cat manifests/base/params.env | grep "\-n=" | cut -d "=" -f 1)
72+
73+
for image in ${IMAGES}; do
74+
echo "CHECKING: '${image}'"
8475
img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2)
8576
registry=$(echo $img | cut -d '@' -f1)
8677
src_tag=$(skopeo inspect docker://$img | jq '.Env[] | select(startswith("OPENSHIFT_BUILD_NAME=")) | split("=")[1]' | tr -d '"' | sed 's/-amd64$//')
@@ -100,17 +91,10 @@ jobs:
10091
- name: Update the commit.env file
10192
run: |
10293
echo Latest commit is: ${{ steps.hash-n.outputs.HASH_N }} on ${{ env.RELEASE_VERSION_N}}
103-
COMMIT=("odh-minimal-notebook-image-commit-n"
104-
"odh-minimal-gpu-notebook-image-commit-n"
105-
"odh-pytorch-gpu-notebook-image-commit-n"
106-
"odh-generic-data-science-notebook-image-commit-n"
107-
"odh-tensorflow-gpu-notebook-image-commit-n"
108-
"odh-trustyai-notebook-image-commit-n"
109-
"odh-codeserver-notebook-image-commit-n"
110-
"odh-rstudio-notebook-image-commit-n"
111-
"odh-rstudio-gpu-notebook-image-commit-n")
112-
113-
for val in "${COMMIT[@]}"; do
94+
# Get the complete list of images N-1-version to update
95+
COMMIT=$(cat manifests/base/commit.env | grep "\-n=" | cut -d "=" -f 1)
96+
97+
for val in ${COMMIT}; do
11498
echo $val
11599
sed -i "s|${val}=.*|${val}=${{ steps.hash-n.outputs.HASH_N }}|" manifests/base/commit.env
116100
done
@@ -148,19 +132,10 @@ jobs:
148132
- name: Update the param.env file
149133
run: |
150134
echo Latest commit is: ${{ steps.hash-n-1.outputs.HASH_N_1 }} on ${{ env.RELEASE_VERSION_N_1}}
151-
IMAGES=("odh-minimal-notebook-image-n-1"
152-
"odh-minimal-gpu-notebook-image-n-1"
153-
"odh-pytorch-gpu-notebook-image-n-1"
154-
"odh-generic-data-science-notebook-image-n-1"
155-
"odh-tensorflow-gpu-notebook-image-n-1"
156-
"odh-trustyai-notebook-image-n-1"
157-
"odh-codeserver-notebook-image-n-1"
158-
"odh-rstudio-notebook-image-n-1"
159-
"odh-rstudio-gpu-notebook-image-n-1")
160-
161-
for ((i=0;i<${#IMAGES[@]};++i)); do
162-
image=${IMAGES[$i]}
163-
echo "CHECKING: " $image
135+
IMAGES=$(cat manifests/base/params.env | grep "\-n-1=" | cut -d "=" -f 1)
136+
137+
for image in ${IMAGES}; do
138+
echo "CHECKING: '${image}'"
164139
img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2)
165140
registry=$(echo $img | cut -d '@' -f1)
166141
src_tag=$(skopeo inspect docker://$img | jq '.Env[] | select(startswith("OPENSHIFT_BUILD_NAME=")) | split("=")[1]' | tr -d '"' | sed 's/-amd64$//')
@@ -179,17 +154,10 @@ jobs:
179154
- name: Update the commit.env file
180155
run: |
181156
echo Latest commit is: ${{ steps.hash-n-1.outputs.HASH_N_1 }} on ${{ env.RELEASE_VERSION_N_1}}
182-
COMMIT=("odh-minimal-notebook-image-commit-n-1"
183-
"odh-minimal-gpu-notebook-image-commit-n-1"
184-
"odh-pytorch-gpu-notebook-image-commit-n-1"
185-
"odh-generic-data-science-notebook-image-commit-n-1"
186-
"odh-tensorflow-gpu-notebook-image-commit-n-1"
187-
"odh-trustyai-notebook-image-commit-n-1"
188-
"odh-codeserver-notebook-image-commit-n-1"
189-
"odh-rstudio-notebook-image-commit-n-1"
190-
"odh-rstudio-gpu-notebook-image-commit-n-1")
191-
192-
for val in "${COMMIT[@]}"; do
157+
# Get the complete list of images N-1-version to update
158+
COMMIT=$(cat manifests/base/commit.env | grep "\-n-1=" | cut -d "=" -f 1)
159+
160+
for val in ${COMMIT}; do
193161
echo $val
194162
sed -i "s|${val}=.*|${val}=${{ steps.hash-n-1.outputs.HASH_N_1 }}|" manifests/base/commit.env
195163
done

0 commit comments

Comments
 (0)