Skip to content

Commit

Permalink
mce-install: Adjust 'OVERRIDE_HO_IMAGE' logic and display HO info (#6…
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangquanLi930 authored Dec 26, 2024
1 parent b612301 commit 88e54a4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ metadata:
data:
hypershift-operator: ${OVERRIDE_HO_IMAGE}
EOF
while ! [ "$(oc get deployment operator -n hypershift -o jsonpath='{.status.conditions[?(@.type=="Progressing")].reason}')" == NewReplicaSetAvailable ]; do
while ! [[ "$(oc get deployment operator -n hypershift -o jsonpath='{.spec.template.spec.containers[*].image}')" == "$OVERRIDE_HO_IMAGE" ]]; do
echo "wait override hypershift operator IMAGE..."
sleep 10
done
oc wait deployment -n hypershift operator --for=condition=Available --timeout=5m
fi

# display HyperShift cli version
Expand All @@ -248,4 +249,8 @@ if [ "$arch" == "x86_64" ]; then
chmod +x /tmp/${HYPERSHIFT_NAME}
cd -
fi
if (( $(awk 'BEGIN {print ("'"$MCE_VERSION"'" > 2.3)}') )); then /tmp/${HYPERSHIFT_NAME} version; else /tmp/${HYPERSHIFT_NAME} --version; fi
if (( $(awk 'BEGIN {print ("'"$MCE_VERSION"'" > 2.3)}') )); then /tmp/${HYPERSHIFT_NAME} version; else /tmp/${HYPERSHIFT_NAME} --version; fi

# display HyperShift Operator Version
oc get deployment -n hypershift operator -ojsonpath='{.spec.template.spec.containers[*].image}' | tee "$ARTIFACT_DIR/HyperShiftOperator-info.txt" >/dev/null; echo >> "$ARTIFACT_DIR/HyperShiftOperator-info.txt"
oc logs -n hypershift -lapp=operator --tail=-1 -c operator | head -1 | jq >> "$ARTIFACT_DIR/HyperShiftOperator-info.txt"

0 comments on commit 88e54a4

Please sign in to comment.