@@ -57,28 +57,53 @@ jobs:
5757 NODE_OPTIONS : --max_old_space_size=16384
5858 run : xvfb-run npm run test:coverage --silent
5959
60+ # Install and start KinD cluster
6061 - name : Start KinD cluster
6162 if : (success() || failure()) && runner.os == 'Linux'
6263 uses : helm/kind-action@v1.14.0
6364 with :
6465 version : v0.31.0
6566 node_image : kindest/node:v1.34.0
6667
68+ # Configure cluster
6769 - name : Configure cluster
6870 if : (success() || failure()) && runner.os == 'Linux'
6971 run : |
70- curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.19.1/install.sh | bash -s v0.19.1
71- kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
72- kubectl create -f https://operatorhub.io/install/cloudnative-pg.yaml
73- nb=0
74- echo -n "Waiting for operator to show up "
75- while [ "$nb" != "2" ]
76- do
77- echo -n "."
78- sleep 1
79- nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
72+ set -euo pipefail
73+
74+ echo "Installing CloudNativePG..."
75+ kubectl create -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.1.yaml
76+
77+ echo "Installing OLM (for SBO)..."
78+ kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.42.0/crds.yaml
79+ kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.42.0/olm.yaml
80+
81+ kubectl wait --for=condition=Available deployment -n olm --all --timeout=180s
82+
83+ echo "Installing Service Binding Operator via OLM..."
84+ kubectl apply -f https://operatorhub.io/install/service-binding-operator.yaml
85+
86+ echo "Waiting for operators..."
87+
88+ # CNPG
89+ kubectl wait --for=condition=Available deployment -n cnpg-system --all --timeout=180s
90+
91+ # OLM async flow
92+ echo "Waiting for Service Binding Operator CSV to appear..."
93+ until kubectl get csv -n operators | grep -q service-binding-operator; do
94+ sleep 2
8095 done
81- echo CLUSTER_URL=`kubectl cluster-info | sed -n -e "s/\x1B\[[0-9;]*[a-zA-Z]//g" -e '1s/.*running at \(.*\)$/\1/p'` >> $GITHUB_ENV
96+
97+ echo "Waiting for Service Binding Operator CSV to succeed..."
98+ kubectl wait --for=jsonpath='{.status.phase}'=Succeeded \
99+ csv -n operators --all --timeout=300s
100+
101+ # Now safe
102+ kubectl wait --for=condition=Available deployment -n operators --all --timeout=180s
103+
104+ echo "Extracting cluster URL..."
105+ echo "CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')" >> $GITHUB_ENV
106+
82107 # UI tests fail under linux
83108 # Run UI tests
84109 - name : Run UI Tests
0 commit comments