From fbf9c3100e794209cb17dcd1e28006fbf479b3af Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 17:48:06 +0530 Subject: [PATCH 01/13] added changes --- .github/workflow/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflow/ci.yaml diff --git a/.github/workflow/ci.yaml b/.github/workflow/ci.yaml new file mode 100644 index 00000000000..f60a6680e41 --- /dev/null +++ b/.github/workflow/ci.yaml @@ -0,0 +1,24 @@ +name: Manual maven steps for ci +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + manual: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + - 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 + From cd590b79a96816c841f5eb5a5c7d9caa8fe21eef Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 17:53:51 +0530 Subject: [PATCH 02/13] added commit --- .github/{workflow/ci.yaml => workflows/ci 1.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflow/ci.yaml => workflows/ci 1.yaml} (100%) diff --git a/.github/workflow/ci.yaml b/.github/workflows/ci 1.yaml similarity index 100% rename from .github/workflow/ci.yaml rename to .github/workflows/ci 1.yaml From 23e9ca189f28e58ec3779bf34d7e28437d88d8aa Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 20:28:36 +0530 Subject: [PATCH 03/13] added uploading jar file --- .github/workflows/ci 1.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci 1.yaml b/.github/workflows/ci 1.yaml index f60a6680e41..b22ec483bdb 100644 --- a/.github/workflows/ci 1.yaml +++ b/.github/workflows/ci 1.yaml @@ -21,4 +21,9 @@ jobs: with: files: | **/target/surefire-reports/*.xml - + + - name: Uploading packaged jar files + uses: actions/upload-artifact@v4 + with: + name: spring-petclinic-jar + path: '**/target/*.jar' From b2d2e0070e773148c3a308b0a253b65bdcaee531 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 20:47:40 +0530 Subject: [PATCH 04/13] added jar file --- .github/workflows/ci 1.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci 1.yaml b/.github/workflows/ci 1.yaml index b22ec483bdb..d520bff8e8d 100644 --- a/.github/workflows/ci 1.yaml +++ b/.github/workflows/ci 1.yaml @@ -5,6 +5,10 @@ on: - main workflow_dispatch: +permissions: + contents: read + checks: write + jobs: manual: runs-on: ubuntu-24.04 @@ -14,6 +18,7 @@ jobs: with: distribution: 'temurin' java-version: '21' + cache: maven - name: build package run: mvn ${{ vars.GOAL }} - name: publish test results From 1039a80eedb5432ef55910f5414ee92f16e04b8b Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 21:25:56 +0530 Subject: [PATCH 05/13] added a new feature --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1f865c56f2d..c16b76884f8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) + + ## Run Petclinic locally Spring Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/) or [Gradle](https://spring.io/guides/gs/gradle/). You can build a jar file and run it from the command line (it should work just as well with Java 17 or newer): From dc43a9a7099d4471daf3b0dd0f6777a520338c10 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 21:51:17 +0530 Subject: [PATCH 06/13] updated further --- .github/workflows/ci 1.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci 1.yaml b/.github/workflows/ci 1.yaml index d520bff8e8d..c1386de75d6 100644 --- a/.github/workflows/ci 1.yaml +++ b/.github/workflows/ci 1.yaml @@ -8,6 +8,7 @@ on: permissions: contents: read checks: write + pull-requests: write jobs: manual: From 9e4696658280f855e67262ec55eff9e6e13e0eb4 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 17 Sep 2025 22:24:38 +0530 Subject: [PATCH 07/13] added commit 4 --- .github/workflows/ci 1.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci 1.yaml b/.github/workflows/ci 1.yaml index d520bff8e8d..288319fa00b 100644 --- a/.github/workflows/ci 1.yaml +++ b/.github/workflows/ci 1.yaml @@ -12,12 +12,16 @@ permissions: jobs: manual: runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + java: [17, 21] steps: - uses: actions/checkout@v5 - uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: '21' + java-version: ${{ matrix.java }} cache: maven - name: build package run: mvn ${{ vars.GOAL }} @@ -30,5 +34,5 @@ jobs: - name: Uploading packaged jar files uses: actions/upload-artifact@v4 with: - name: spring-petclinic-jar + name: spring-petclinic-${{ matrix.java }}jar path: '**/target/*.jar' From cd03d1e780e75ed02d258487f423afb01424d1f2 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Thu, 18 Sep 2025 17:18:25 +0530 Subject: [PATCH 08/13] added change --- .github/dco.yml | 2 - .github/workflows/ci 1.yaml | 38 ------------------- .github/workflows/deploy-and-test-cluster.yml | 31 --------------- .github/workflows/gradle-build.yml | 31 --------------- .github/workflows/maven-build.yml | 29 -------------- 5 files changed, 131 deletions(-) delete mode 100644 .github/dco.yml delete mode 100644 .github/workflows/ci 1.yaml delete mode 100644 .github/workflows/deploy-and-test-cluster.yml delete mode 100644 .github/workflows/gradle-build.yml delete mode 100644 .github/workflows/maven-build.yml diff --git a/.github/dco.yml b/.github/dco.yml deleted file mode 100644 index 37e411e1bee..00000000000 --- a/.github/dco.yml +++ /dev/null @@ -1,2 +0,0 @@ -require: - members: false \ No newline at end of file diff --git a/.github/workflows/ci 1.yaml b/.github/workflows/ci 1.yaml deleted file mode 100644 index 288319fa00b..00000000000 --- a/.github/workflows/ci 1.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Manual maven steps for ci -on: - pull_request: - branches: - - main - workflow_dispatch: - -permissions: - contents: read - checks: write - -jobs: - manual: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - java: [17, 21] - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-java@v5 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - 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-${{ matrix.java }}jar - path: '**/target/*.jar' diff --git a/.github/workflows/deploy-and-test-cluster.yml b/.github/workflows/deploy-and-test-cluster.yml deleted file mode 100644 index 7353a604bba..00000000000 --- a/.github/workflows/deploy-and-test-cluster.yml +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index c24c121b1e6..00000000000 --- a/.github/workflows/gradle-build.yml +++ /dev/null @@ -1,31 +0,0 @@ -# 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 deleted file mode 100644 index a1ec4dab78c..00000000000 --- a/.github/workflows/maven-build.yml +++ /dev/null @@ -1,29 +0,0 @@ -# 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 From 24ef3de229115516ba764a18426701aeba8b34f5 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Thu, 18 Sep 2025 19:17:24 +0530 Subject: [PATCH 09/13] created a pull request workflow --- .github/workflows/manual-mvn.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/manual-mvn.yaml diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml new file mode 100644 index 00000000000..b2c7338a6f2 --- /dev/null +++ b/.github/workflows/manual-mvn.yaml @@ -0,0 +1,19 @@ +name: manual maven steps for ci +on: + pull_request: + branches: + - main +jobs: + manual: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + - name: build package + run: mvn clean package + + + From cf19f703b26ccebfd62153348bf7588424c67ded Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 1 Oct 2025 10:48:59 +0530 Subject: [PATCH 10/13] added changes --- .../samples/petclinic/system/WelcomeController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java index d77a35ea8c6..40b096e2058 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -26,5 +26,10 @@ class WelcomeController { public String welcome() { return "welcome"; } + @GetMapping("/message") + public String message() { + return "welcome"; } + +} \ No newline at end of file From 3c9fe3a51cbd413cdb8f5c522a1ffd920f849840 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 1 Oct 2025 11:21:37 +0530 Subject: [PATCH 11/13] added changes --- .../samples/petclinic/system/WelcomeController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java index d77a35ea8c6..b575c3cd070 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -26,5 +26,11 @@ class WelcomeController { public String welcome() { return "welcome"; } + + @GetMapping("/message") + public String message() { + return "welcome"; } + +} \ No newline at end of file From e57cdaae36e6a5b3e103e9a761b3568936435fc7 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Wed, 1 Oct 2025 12:02:33 +0530 Subject: [PATCH 12/13] added commit --- .../samples/petclinic/system/WelcomeController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java index 12d044c285d..33c40175d0d 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -27,6 +27,10 @@ public String welcome() { return "welcome"; } +@GetMapping("/message") + public String message() { + return "welcome"; + } } \ No newline at end of file From 2816aa189970f6316d738c758084fa668cfa6303 Mon Sep 17 00:00:00 2001 From: Harshitha Date: Thu, 2 Oct 2025 16:11:00 +0530 Subject: [PATCH 13/13] c1 --- .../samples/petclinic/system/WelcomeController.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java index 40b096e2058..b3a34470ae8 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -25,11 +25,7 @@ class WelcomeController { @GetMapping("/") public String welcome() { return "welcome"; - } - @GetMapping("/message") - public String message() { - return "welcome"; - + } } \ No newline at end of file