@@ -14,14 +14,44 @@ if ! [ -z "${SKIP_OPERATOR_INSTALL}" ]; then
14
14
./setup.sh -t ~ /peak/operatorsetup 2>&1
15
15
else
16
16
echo " Installing operator from community marketplace"
17
- while [[ $retry -gt 0 ]]; do
18
17
19
- # patch bug in peak setup script
20
- sed -i " s/path=\" {.status.channels.*/ | jq '.status.channels | .[0].currentCSVDesc.installModes | map(select(.type == \" AllNamespaces\" )) | .[0].supported')/" setup.sh
21
- sed -i " s/csource=.*/echo \$ 3; csource=\$ 3/" setup.sh
22
- sed -i ' s/installop \$.*/installop \${vals[0]} \${vals[1]} \${vals[3]}/' setup.sh
18
+ start_t=$( date +%s) 2>&1
19
+ ready=false 2>&1
20
+ while ! $ready ; do
21
+ CATALOG_SOURCES=$( oc get catalogsources -n openshift-marketplace 2> /dev/null | grep ' community-operators' )
22
+ if [ ! -z " ${CATALOG_SOURCES} " ]; then
23
+ echo $CATALOG_SOURCES
24
+ ready=true 2>&1
25
+ else
26
+ sleep 10
27
+ fi
28
+ if [ $(( $(date +% s)- start_t)) -gt 300 ]; then
29
+ echo " Marketplace pods never started"
30
+ exit 1
31
+ fi
32
+ done
33
+
34
+ start_t=$( date +%s) 2>&1
35
+ ready=false 2>&1
36
+ while ! $ready ; do
37
+ MANIFESTS=$( oc get packagemanifests -n openshift-marketplace 2> /dev/null | grep ' opendatahub' )
38
+ echo $MANIFESTS
39
+ if [ ! -z " ${MANIFESTS} " ]; then
40
+ echo $MANIFESTS
41
+ ready=true 2>&1
42
+ else
43
+ sleep 10
44
+ fi
45
+ if [ $(( $(date +% s)- start_t)) -gt 900 ]; then
46
+ echo " Package manifests never downloaded"
47
+ exit 1
48
+ fi
49
+ done
50
+
51
+ while [[ $retry -gt 0 ]]; do
52
+ ./setup.sh -o ~ /peak/operatorsetup\
23
53
24
- ./setup.sh -o ~ /peak/operatorsetup
54
+ # approve installplans
25
55
if [ $? -eq 0 ]; then
26
56
retry=-1
27
57
else
31
61
fi
32
62
retry=$(( retry - 1 ))
33
63
64
+ sleep 30
65
+ echo " Approving Install Plans, if needed"
66
+ oc patch installplan $( oc get installplan -n openshift-operators | grep $ODH_VERSION | awk ' {print $1}' ) -n openshift-operators --type merge --patch ' {"spec":{"approved":true}}' || true
67
+ oc patch installplan $( oc get installplan -n openshift-operators | grep authorino | awk ' {print $1}' ) -n openshift-operators --type merge --patch ' {"spec":{"approved":true}}' || true
68
+
34
69
finished=false 2>&1
35
70
start_t=$( date +%s) 2>&1
36
71
echo " Verifying installation of ODH operator"
37
72
while ! $finished ; do
38
- if [ ! -z " $( oc get pods -n openshift-operators | grep ' opendatahub-operator-controller-manager' | grep ' 1/1' ) " ]; then
73
+ if [ ! -z " $( oc get pods -n openshift-operators | grep ' opendatahub-operator-controller-manager' | grep ' 1/1' ) " ]; then
39
74
finished=true 2>&1
40
75
else
41
76
sleep 10
50
85
done
51
86
fi
52
87
53
- # popd
54
- # ## Grabbing and applying the patch in the PR we are testing
55
- # pushd ~/src/${REPO_NAME}
56
- # if [ -z "$PULL_NUMBER" ]; then
57
- # echo "No pull number, assuming nightly run"
58
- # else
59
- # if [ $REPO_OWNER == "trustyai-explainability" ]; then
60
- # curl -O -L https://github.com/${REPO_OWNER}/${REPO_NAME}/pull/${PULL_NUMBER}.patch
61
- # echo "Applying followng patch:"
62
- # cat ${PULL_NUMBER}.patch > ${ARTIFACT_DIR}/github-pr-${PULL_NUMBER}.patch
63
- # git apply ${PULL_NUMBER}.patch
64
- # fi
65
- # fi
66
-
67
88
popd
68
89
# # Point manifests repo uri in the KFDEF to the manifests in the PR
69
90
pushd ~ /kfdef
0 commit comments