Skip to content

Integration gh workflow for test install and uninstall #4

Integration gh workflow for test install and uninstall

Integration gh workflow for test install and uninstall #4

Workflow file for this run

name: Integration Test
on:
push:
branches:
- main
pull_request:
jobs:
smoke:
name: smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Create KinD cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: quickstart-test
- name: Run install script
run: LOCAL_DIR=. TIMEOUT=300s ./install.sh
- name: Verify deployments
run: |
echo "--- Strimzi operator ---"
kubectl get deployment -n strimzi strimzi-cluster-operator
echo "--- Apicurio Registry operator ---"
kubectl get deployment -n apicurio-registry apicurio-registry-operator
echo "--- StreamsHub Console operator ---"
kubectl get deployment -n streamshub-console streamshub-console-operator
echo "--- Kafka cluster ---"
kubectl wait kafka/dev-cluster --for=condition=Ready -n kafka --timeout=600s
echo "--- Apicurio Registry instance ---"
kubectl wait apicurioregistry3/apicurio-registry --for=condition=Ready -n apicurio-registry --timeout=600s
echo "--- StreamsHub Console instance ---"
kubectl wait console.console.streamshub.github.com/streamshub-console --for=condition=Ready -n streamshub-console --timeout=600s
- name: Run uninstall script
run: LOCAL_DIR=. TIMEOUT=300s ./uninstall.sh
- name: Verify uninstall
run: |
echo "--- Checking for remaining quick-start resources ---"
remaining=$(kubectl get all -A -l app.kubernetes.io/part-of=streamshub-developer-quickstart --no-headers 2>/dev/null | wc -l | tr -d ' ')
if [ "$remaining" -gt 0 ]; then
echo "ERROR: Found $remaining remaining resources after uninstall:"
kubectl get all -A -l app.kubernetes.io/part-of=streamshub-developer-quickstart
exit 1
fi
echo "All quick-start resources successfully removed"
- name: Debug on failure
if: failure()
run: |
echo "=== CR status ==="
kubectl get apicurioregistry3/apicurio-registry -n apicurio-registry -o yaml 2>/dev/null || true
kubectl get kafka/dev-cluster -n kafka -o yaml 2>/dev/null || true
kubectl get console.console.streamshub.github.com/streamshub-console -n streamshub-console -o yaml 2>/dev/null || true
echo ""
echo "=== Events (all namespaces) ==="
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -50
echo ""
echo "=== Pods (all namespaces) ==="
kubectl get pods --all-namespaces
echo ""
for ns in strimzi kafka apicurio-registry streamshub-console; do
echo "=== Pods in ${ns} ==="
kubectl get pods -n "${ns}" -o wide 2>/dev/null || true
echo "=== Pod logs in ${ns} ==="
for pod in $(kubectl get pods -n "${ns}" -o name 2>/dev/null); do
echo "--- ${pod} ---"
kubectl logs "${pod}" -n "${ns}" --tail=30 2>/dev/null || true
done
done