From 8cd589324c8e5513440dda471c331281203186df Mon Sep 17 00:00:00 2001 From: Vamsi Krishna Date: Wed, 17 Dec 2025 14:08:00 +0530 Subject: [PATCH] Revert "Removed default yml files and added ci.yml" This reverts commit e3ce792135b219eda216907071e6000c1e3d3419. --- .github/workflows/ci.yml | 0 .github/workflows/deploy-and-test-cluster.yml | 31 +++++++++++++++++++ .github/workflows/gradle-build.yml | 31 +++++++++++++++++++ .github/workflows/maven-build.yml | 29 +++++++++++++++++ 4 files changed, 91 insertions(+) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy-and-test-cluster.yml create mode 100644 .github/workflows/gradle-build.yml create mode 100644 .github/workflows/maven-build.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/.github/workflows/deploy-and-test-cluster.yml b/.github/workflows/deploy-and-test-cluster.yml new file mode 100644 index 000000000..7353a604b --- /dev/null +++ b/.github/workflows/deploy-and-test-cluster.yml @@ -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 + diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml new file mode 100644 index 000000000..c24c121b1 --- /dev/null +++ b/.github/workflows/gradle-build.yml @@ -0,0 +1,31 @@ +# This workflow will build a Java project with Gradle, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{matrix.java}} + uses: actions/setup-java@v4 + with: + java-version: ${{matrix.java}} + distribution: 'adopt' + cache: maven + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build with Gradle + run: ./gradlew build diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml new file mode 100644 index 000000000..a1ec4dab7 --- /dev/null +++ b/.github/workflows/maven-build.yml @@ -0,0 +1,29 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{matrix.java}} + uses: actions/setup-java@v4 + with: + java-version: ${{matrix.java}} + distribution: 'adopt' + cache: maven + - name: Build with Maven Wrapper + run: ./mvnw -B verify