Skip to content

Commit

Permalink
Add timeout loop to DSC install (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobGeada authored Sep 30, 2024
1 parent df96ffd commit f366b6e
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,23 @@ else

echo "Creating the following DSC"
cat ./${DSC_FILENAME} > ${ARTIFACT_DIR}/${DSC_FILENAME}
oc apply -f ./odh-core-dsci.yaml
oc apply -f ./${DSC_FILENAME}

kfctl_result=$?
if [ "$kfctl_result" -ne 0 ]; then
start_t=$(date +%s) 2>&1
ready=1 2>&1
while [ "$ready" -ne 0 ]; do
oc apply -f ./odh-core-dsci.yaml
oc apply -f ./${DSC_FILENAME}
ready=$?
if [ $(($(date +%s)-start_t)) -gt 300 ]; then
echo "ODH DSC Installation timeout"
exit 1
fi
sleep 10
done

if [ "$ready" -ne 0 ]; then
echo "The installation failed"
exit $kfctl_result
exit $ready
fi
fi
set +x
Expand Down

0 comments on commit f366b6e

Please sign in to comment.