|
| 1 | +name: Integration Test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + smoke: |
| 11 | + name: Test kustomize on KinD |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 15 | + |
| 16 | + - name: Create KinD cluster |
| 17 | + uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 |
| 18 | + with: |
| 19 | + cluster_name: quickstart-test |
| 20 | + |
| 21 | + - name: Run install script |
| 22 | + run: LOCAL_DIR=. TIMEOUT=300s ./install.sh |
| 23 | + |
| 24 | + - name: Verify deployments |
| 25 | + run: | |
| 26 | + echo "--- Strimzi operator ---" |
| 27 | + kubectl get deployment -n strimzi strimzi-cluster-operator |
| 28 | + echo "--- Kafka cluster ---" |
| 29 | + kubectl get kafka -n kafka |
| 30 | + echo "--- Apicurio Registry operator ---" |
| 31 | + kubectl get deployment -n apicurio-registry apicurio-registry-operator |
| 32 | + echo "--- StreamsHub Console operator ---" |
| 33 | + kubectl get deployment -n streamshub-console streamshub-console-operator |
| 34 | +
|
| 35 | + - name: Run uninstall script |
| 36 | + run: LOCAL_DIR=. TIMEOUT=300s ./uninstall.sh |
| 37 | + |
| 38 | + - name: Verify uninstall |
| 39 | + run: | |
| 40 | + echo "--- Checking for remaining quick-start resources ---" |
| 41 | + remaining=$(kubectl get all -A -l app.kubernetes.io/part-of=streamshub-developer-quickstart --no-headers 2>/dev/null | wc -l | tr -d ' ') |
| 42 | + if [ "$remaining" -gt 0 ]; then |
| 43 | + echo "ERROR: Found $remaining remaining resources after uninstall:" |
| 44 | + kubectl get all -A -l app.kubernetes.io/part-of=streamshub-developer-quickstart |
| 45 | + exit 1 |
| 46 | + fi |
| 47 | + echo "All quick-start resources successfully removed" |
| 48 | +
|
| 49 | + - name: Debug on failure |
| 50 | + if: failure() |
| 51 | + run: | |
| 52 | + echo "=== Events (all namespaces) ===" |
| 53 | + kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -50 |
| 54 | + echo "" |
| 55 | + echo "=== Pods (all namespaces) ===" |
| 56 | + kubectl get pods --all-namespaces |
| 57 | + echo "" |
| 58 | + for ns in strimzi kafka apicurio-registry streamshub-console; do |
| 59 | + echo "=== Pods in ${ns} ===" |
| 60 | + kubectl get pods -n "${ns}" -o wide 2>/dev/null || true |
| 61 | + echo "=== Pod logs in ${ns} ===" |
| 62 | + for pod in $(kubectl get pods -n "${ns}" -o name 2>/dev/null); do |
| 63 | + echo "--- ${pod} ---" |
| 64 | + kubectl logs "${pod}" -n "${ns}" --tail=30 2>/dev/null || true |
| 65 | + done |
| 66 | + done |
0 commit comments