Skip to content

Commit 317562a

Browse files
therepanicdsyer
authored andcommitted
Implement K8S deployment testing using Kind in GitHub Actions
1 parent 1cad412 commit 317562a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy and Test Cluster
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'k8s/**'
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- 'k8s/**'
12+
13+
jobs:
14+
deploy-and-test-cluster:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repository
18+
uses: actions/checkout@v2
19+
20+
- name: Create k8s Kind Cluster
21+
uses: helm/kind-action@v1
22+
23+
- name: Deploy application
24+
run: |
25+
kubectl apply -f k8s/
26+
27+
- name: Wait for Pods to be ready
28+
run: |
29+
kubectl wait --for=condition=ready pod -l app=demo-db --timeout=180s
30+
kubectl wait --for=condition=ready pod -l app=petclinic --timeout=180s
31+

0 commit comments

Comments
 (0)