-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement K8S deployment testing using Kind in GitHub Actions
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Deploy and Test Cluster | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'k8s/**' | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'k8s/**' | ||
|
||
jobs: | ||
deploy-and-test-cluster: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create k8s Kind Cluster | ||
uses: helm/kind-action@v1 | ||
|
||
- name: Deploy application | ||
run: | | ||
kubectl apply -f k8s/ | ||
- name: Wait for Pods to be ready | ||
run: | | ||
kubectl wait --for=condition=ready pod -l app=demo-db --timeout=180s | ||
kubectl wait --for=condition=ready pod -l app=petclinic --timeout=180s | ||