Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions .github/workflows/deploy-and-test-cluster.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
name: Deploy and Test Cluster

name: Manual maven steps for ci
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
pull_request:
branches:
- main
workflow_dispatch:

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
permissions:
contents: read
checks: write

- 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
jobs:
manual:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
cache: maven
- name: build package
run: mvn ${{ vars.GOAL }}
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/target/surefire-reports/*.xml

- name: Uploading packaged jar files
uses: actions/upload-artifact@v4
with:
name: spring-petclinic-jar
path: '**/target/*.jar'