File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 2929# Deploy the operator bundle
3030operator-sdk run bundle $OPERATOR_BUNDLE_IMAGE_FULL_NAME -n $TNF_EXAMPLE_CNF_NAMESPACE $ADD_SECRET
3131
32- # Important: this line is required to enable csv short names with minikube
32+ # Important: this line (output of command is now captured) is required to enable csv short names with minikube
3333# If short name "csv" is used, the call will fail the first time
3434# With long name the first time it will work and subsequent time it will work with long or short names
35- oc get clusterserviceversions.operators.coreos.com -n $TNF_EXAMPLE_CNF_NAMESPACE
35+ CSV_MATCH=$( oc get clusterserviceversions.operators.coreos.com -n $TNF_EXAMPLE_CNF_NAMESPACE -ogo-template=' {{ range .items}}{{.metadata.name}}{{end}}' 2> /dev/null | grep " nginx-operator.v0.0.1" )
36+ if [ " $CSV_MATCH " = " nginx-operator.v0.0.1" ];
37+ then
38+ echo " CSV successfully deployed"
39+ else
40+ echo " ERROR: CSV not deployed. Operator deployment failed -- interrupting tests"
41+ exit 1
42+ fi
43+
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- set -x
2+
3+ # Initialization
4+ SCRIPT_DIR=$( dirname " $0 " )
5+ source $SCRIPT_DIR /init-env.sh
36
47# Install OLM
58operator-sdk olm uninstall
6- operator-sdk olm install
9+ operator-sdk olm install --version=v0.18.3
10+ # Wait for all OLM pods to be ready
11+ kubectl wait --for=condition=ready pod --all=true -nolm --timeout=$TNF_DEPLOYMENT_TIMEOUT
12+ sleep 5s
Original file line number Diff line number Diff line change 1616 export OS=" $( uname | awk ' {print tolower($0)}' ) "
1717
1818 # # Download executable
19- export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.11 .0
19+ export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.15 .0
2020 curl -LO ${OPERATOR_SDK_DL_URL} /operator-sdk_${OS} _${ARCH}
2121
2222 # # Download the auth key
You can’t perform that action at this time.
0 commit comments