Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/main' into RHOAIE…
Browse files Browse the repository at this point in the history
…NG-4870
  • Loading branch information
ruivieira committed Mar 28, 2024
2 parents 9dea6ec + 899b163 commit 66a16b0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ go.work
.DS_Store
bin
.vscode

# CI Test Outputs
tests/artifacts/*
28 changes: 25 additions & 3 deletions tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,38 @@ if ! [ -z "${SKIP_OPERATOR_INSTALL}" ]; then
else
echo "Installing operator from community marketplace"
while [[ $retry -gt 0 ]]; do
./setup.sh -o ~/peak/operatorsetup 2>&1

# patch bug in peak setup script
sed -i "s/path=\"{.status.channels.*/ | jq '.status.channels | .[0].currentCSVDesc.installModes | map(select(.type == \"AllNamespaces\")) | .[0].supported')/" setup.sh
sed -i "s/csource=.*/echo \$3; csource=\$3/" setup.sh
sed -i 's/installop \$.*/installop \${vals[0]} \${vals[1]} \${vals[3]}/' setup.sh

./setup.sh -o ~/peak/operatorsetup
if [ $? -eq 0 ]; then
retry=-1
else
echo "Trying restart of marketplace community operator pod"
oc delete pod -n openshift-marketplace $(oc get pod -n openshift-marketplace -l marketplace.operatorSource=community-operators -o jsonpath="{$.items[*].metadata.name}")
sleep 3m
fi
fi
retry=$(( retry - 1))
sleep 1m

finished=false 2>&1
start_t=$(date +%s) 2>&1
echo "Verifying installation of ODH operator"
while ! $finished; do
if [ ! -z "$(oc get pods -n openshift-operators | grep 'opendatahub-operator-controller-manager' | grep '1/1')" ]; then
finished=true 2>&1
else
sleep 10
fi

if [ $(($(date +%s)-start_t)) -gt 300 ]; then
echo "ODH Operator installation timeout, existing test"
exit 1
fi
done

done
fi

Expand Down

0 comments on commit 66a16b0

Please sign in to comment.