Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 54 additions & 9 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,73 @@ jobs:
NODE_OPTIONS: --max_old_space_size=16384
run: xvfb-run npm run test:coverage --silent

# Install and start KinD cluster
- name: Start KinD cluster
if: (success() || failure()) && runner.os == 'Linux'
uses: helm/kind-action@v1.14.0
with:
version: v0.31.0
node_image: kindest/node:v1.34.0

# Configure cluster
- name: Configure cluster
if: (success() || failure()) && runner.os == 'Linux'
run: |
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.19.1/install.sh | bash -s v0.19.1
kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
kubectl create -f https://operatorhub.io/install/cloudnative-pg.yaml
nb=0
echo -n "Waiting for operator to show up "
while [ "$nb" != "2" ]
do
set -euo pipefail

echo "Installing CloudNativePG..."
kubectl create -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.1.yaml

echo "Installing OLM (for SBO)..."
kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.42.0/crds.yaml
kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.42.0/olm.yaml

kubectl wait --for=condition=Available deployment -n olm --all --timeout=180s

echo "Installing Service Binding Operator via OLM..."
kubectl apply -f https://operatorhub.io/install/service-binding-operator.yaml

echo "Waiting for operators..."

# CNPG
kubectl wait --for=condition=Available deployment -n cnpg-system --all --timeout=180s

# OLM async flow
echo -n "Waiting for Service Binding Operator CSV to appear "

timeout=300
elapsed=0

while ! kubectl get csv -n operators 2>/dev/null | grep -q service-binding-operator; do
echo -n "."
sleep 1
nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
elapsed=$((elapsed+1))

if [ "$elapsed" -ge "$timeout" ]; then
echo ""
echo "❌ Timeout waiting for Service Binding Operator CSV"

kubectl get subscription -n operators || true
kubectl get installplan -n operators || true
kubectl get csv -n operators || true
kubectl get pods -n operators || true

exit 1
fi
done
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

echo ""

echo "Waiting for Service Binding Operator CSV to succeed..."
kubectl wait --for=jsonpath='{.status.phase}'=Succeeded \
csv -n operators --all --timeout=300s

# Now safe
kubectl wait --for=condition=Available deployment -n operators --all --timeout=180s

echo "Extracting cluster URL..."
echo "CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')" >> $GITHUB_ENV

# UI tests fail under linux
# Run UI tests
- name: Run UI Tests
Expand Down
Loading