Skip to content

Commit 9d17ce6

Browse files
committed
Integration gh workflow for test install and uninstall
Signed-off-by: David Kornel <kornys@outlook.com>
1 parent 82e5334 commit 9d17ce6

4 files changed

Lines changed: 92 additions & 6 deletions

File tree

.github/workflows/integration.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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

.github/workflows/validate.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ name: Validate
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
78

89
jobs:
910
kustomize-build:
1011
name: Validate Kustomize configs
1112
runs-on: ubuntu-latest
1213
steps:
13-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1415

1516
- name: Set up kubectl
16-
uses: azure/setup-kubectl@v4
17+
uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4.0.1
1718

1819
- name: Build base layer
1920
run: kubectl kustomize base/
@@ -33,10 +34,10 @@ jobs:
3334
name: Lint shell scripts
3435
runs-on: ubuntu-latest
3536
steps:
36-
- uses: actions/checkout@v6
37+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3738

3839
- name: Run ShellCheck
39-
uses: ludeeus/action-shellcheck@2.0.0
40+
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
4041
with:
4142
version: v0.11.0
4243
scandir: "."
@@ -46,7 +47,7 @@ jobs:
4647
name: Lint YAML files
4748
runs-on: ubuntu-latest
4849
steps:
49-
- uses: actions/checkout@v6
50+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5051

5152
- name: Install yamllint
5253
run: |

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# VSCode
2+
.vscode
3+
4+
# IntelliJ IDEA specific
5+
.idea/
6+
*.iml
7+
8+
### Mac OS ###
9+
**.DS_Store

.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)