From 2e5cef1b0219654df14b8ff9225868f4bb37a2b3 Mon Sep 17 00:00:00 2001 From: Rk-Yadav7899 Date: Thu, 7 Nov 2024 23:33:06 +0530 Subject: [PATCH 01/24] Update README.md Added two empty lines --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bb3fe977fd3..26581b89830 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ ## 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): ```bash From cc5ec90cb1df7d2496fada480086f34a5da7ac2b Mon Sep 17 00:00:00 2001 From: ramu Date: Tue, 19 Nov 2024 19:48:13 +0530 Subject: [PATCH 02/24] Added a new file --- ramu | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ramu diff --git a/ramu b/ramu new file mode 100644 index 00000000000..e69de29bb2d From e55b7574f5161c1efa46a93406835c6efd209508 Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 28 Dec 2024 08:39:36 +0530 Subject: [PATCH 03/24] Added new changes --- .github/workflows/maven.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/maven.yaml diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml new file mode 100644 index 00000000000..b7d16de8393 --- /dev/null +++ b/.github/workflows/maven.yaml @@ -0,0 +1,23 @@ +--- +name: Java CI with Maven +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 \ No newline at end of file From 776410015ff16176c43551d3380b6ecb6925ed59 Mon Sep 17 00:00:00 2001 From: ramu Date: Sun, 29 Dec 2024 09:18:51 +0530 Subject: [PATCH 04/24] Added stater workflow --- .github/workflows/blank.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/gradle-build.yml | 31 ------------------------- .github/workflows/maven-build.yml | 29 ------------------------ .github/workflows/maven.yaml | 23 ------------------- .github/workflows/maven.yml | 15 +++++++++++++ 5 files changed, 51 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/blank.yml delete mode 100644 .github/workflows/gradle-build.yml delete mode 100644 .github/workflows/maven-build.yml delete mode 100644 .github/workflows/maven.yaml create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 00000000000..01502b13e19 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. 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 diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml deleted file mode 100644 index b7d16de8393..00000000000 --- a/.github/workflows/maven.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Java CI with Maven -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000000..7e0add28e6b --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,15 @@ +--- +name: CI with Maven +on: # when to run + push: + branches: + - main +jobs: + build: + name: "maven" + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: maven build + run: mvn package + From c14a5597a3d95ca0cfa7d1080b097d9a47148e39 Mon Sep 17 00:00:00 2001 From: ramu Date: Sun, 29 Dec 2024 09:41:21 +0530 Subject: [PATCH 05/24] Added new changes --- .github/workflows/maven.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7e0add28e6b..14acad94b34 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,6 +10,11 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 + - name: setup jdk 17 + uses: actions/setup-java@v4 + with: + distribution: 'corretto' # See 'Supported distributions' for available options + java-version: '17' - name: maven build run: mvn package - + From 3195f476764a26e604a73b3774c22f745c7c98c5 Mon Sep 17 00:00:00 2001 From: ramu Date: Sun, 29 Dec 2024 09:54:23 +0530 Subject: [PATCH 06/24] added two jobs --- .github/workflows/maven.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 14acad94b34..caf48dda599 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,7 +5,7 @@ on: # when to run branches: - main jobs: - build: + buildwith17: name: "maven" runs-on: ubuntu-24.04 steps: @@ -17,4 +17,17 @@ jobs: java-version: '17' - name: maven build run: mvn package + buildwith21: + name: "maven" + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: setup jdk 21 + uses: actions/setup-java@v4 + with: + distribution: 'corretto' # See 'Supported distributions' for available options + java-version: '21' + - name: maven build + run: mvn package + From b04f0ff17963129b8b55d82c4d8ea5b6861c8357 Mon Sep 17 00:00:00 2001 From: ramu Date: Sun, 29 Dec 2024 11:13:14 +0530 Subject: [PATCH 07/24] Adde new changes --- .github/workflows/maven.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index caf48dda599..60e36d5470b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -9,25 +9,8 @@ jobs: name: "maven" runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 - - name: setup jdk 17 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' # See 'Supported distributions' for available options - java-version: '17' - - name: maven build - run: mvn package - buildwith21: - name: "maven" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - name: setup jdk 21 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' # See 'Supported distributions' for available options - java-version: '21' - - name: maven build - run: mvn package + - name: print github context + run: echo "${{ toJson(github) }}" + From 45b452d1da3445e1f3d11e22b65b0bc639e1aed6 Mon Sep 17 00:00:00 2001 From: Rk-Yadav7899 Date: Sun, 29 Dec 2024 11:59:57 +0530 Subject: [PATCH 08/24] Update maven.yml --- .github/workflows/maven.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 60e36d5470b..8b7875fbda4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,7 +10,12 @@ jobs: runs-on: ubuntu-24.04 steps: - name: print github context - run: echo "${{ toJson(github) }}" + run: echo "${{ toJson(github) }}" + - shell: bash + env: + SUPER_SECRET: ${{ secrets.USERNAME }} + run: | + echo "$SUPER_SECRET" From 7d714bbe4163927b39890925aaea8b35e37c7c8e Mon Sep 17 00:00:00 2001 From: ramu Date: Sun, 29 Dec 2024 14:26:39 +0530 Subject: [PATCH 09/24] Added new changes --- .github/workflows/blank.yml | 36 ------------------------------- .github/workflows/maven.yml | 16 -------------- .github/workflows/maven/blank.yml | 14 ++++++++++++ 3 files changed, 14 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/blank.yml delete mode 100644 .github/workflows/maven.yml create mode 100644 .github/workflows/maven/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml deleted file mode 100644 index 01502b13e19..00000000000 --- a/.github/workflows/blank.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "main" branch - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index 60e36d5470b..00000000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: CI with Maven -on: # when to run - push: - branches: - - main -jobs: - buildwith17: - name: "maven" - runs-on: ubuntu-24.04 - steps: - - name: print github context - run: echo "${{ toJson(github) }}" - - - diff --git a/.github/workflows/maven/blank.yml b/.github/workflows/maven/blank.yml new file mode 100644 index 00000000000..9fad3698b60 --- /dev/null +++ b/.github/workflows/maven/blank.yml @@ -0,0 +1,14 @@ +--- +name: + push: + branches: + - main + +jobs: + call-workflow-passing-data: + uses: Rk-Yadav7899/ReusableWorkflows/.github/workflows/maven-basic.yaml@main + with: + goal: package + java_version: '17' + + \ No newline at end of file From 6a072254c93a69ddddf59d67047651d84eb28c36 Mon Sep 17 00:00:00 2001 From: Rk-Yadav7899 Date: Sun, 29 Dec 2024 14:36:57 +0530 Subject: [PATCH 10/24] Update maven.yml Added workflow" --- .github/workflows/maven.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8b7875fbda4..68b5d04ca67 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,21 +1,12 @@ --- -name: CI with Maven -on: # when to run +name: push: branches: - main -jobs: - buildwith17: - name: "maven" - runs-on: ubuntu-24.04 - steps: - - name: print github context - run: echo "${{ toJson(github) }}" - - shell: bash - env: - SUPER_SECRET: ${{ secrets.USERNAME }} - run: | - echo "$SUPER_SECRET" - - +jobs: + call-workflow-passing-data: + uses: Rk-Yadav7899/ReusableWorkflows/.github/workflows/maven-basic.yaml@main + with: + goal: package + java_version: '17' From 7d3a42b6b949abcc94c81f62e48cefad0993b941 Mon Sep 17 00:00:00 2001 From: ramu Date: Wed, 24 Sep 2025 13:08:30 +0530 Subject: [PATCH 11/24] Added new changes --- .github/workflows/ci.yaml | 15 +++++++++++++++ .github/workflows/maven.yml | 12 ------------ .github/workflows/maven/blank.yml | 14 -------------- 3 files changed, 15 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/maven.yml delete mode 100644 .github/workflows/maven/blank.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000000..4f6ff7d4a75 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,15 @@ +--- +on: + push: + branches: + - main + workflow_dispatch: #manual trigger + +jobs: + maven: + runs-on: [ 'ubuntu-latest' ] + steps: + - name: checkout the code + uses: actions/checkout@v4 + - name: build code + run: mvn package \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index 68b5d04ca67..00000000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: - push: - branches: - - main - -jobs: - call-workflow-passing-data: - uses: Rk-Yadav7899/ReusableWorkflows/.github/workflows/maven-basic.yaml@main - with: - goal: package - java_version: '17' diff --git a/.github/workflows/maven/blank.yml b/.github/workflows/maven/blank.yml deleted file mode 100644 index 9fad3698b60..00000000000 --- a/.github/workflows/maven/blank.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: - push: - branches: - - main - -jobs: - call-workflow-passing-data: - uses: Rk-Yadav7899/ReusableWorkflows/.github/workflows/maven-basic.yaml@main - with: - goal: package - java_version: '17' - - \ No newline at end of file From 5d57bc944c7c73b0f7a1d8ed13c0c96a220bc8f6 Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 13:21:18 +0530 Subject: [PATCH 12/24] updated --- .github/workflows/ci.yaml | 15 --------------- .github/workflows/manual-mvn.yaml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/manual-mvn.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 4f6ff7d4a75..00000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -on: - push: - branches: - - main - workflow_dispatch: #manual trigger - -jobs: - maven: - runs-on: [ 'ubuntu-latest' ] - steps: - - name: checkout the code - uses: actions/checkout@v4 - - name: build code - run: mvn package \ No newline at end of file diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml new file mode 100644 index 00000000000..3b241bcb22c --- /dev/null +++ b/.github/workflows/manual-mvn.yaml @@ -0,0 +1,19 @@ +--- +name: Manual maven steps for ci +on: + pull_request: + branches: + - main + + workflow_dispath: +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 }}' \ No newline at end of file From f4cfae749805c1ce25f7042a47c58bfd986b269f Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 13:36:10 +0530 Subject: [PATCH 13/24] updated files --- .github/workflows/manual-mvn.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index 3b241bcb22c..2017584a949 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -5,7 +5,7 @@ on: branches: - main - workflow_dispath: + workflow_dispatch: jobs: manual: runs-on: ubuntu-24.04 @@ -16,4 +16,4 @@ jobs: distribution: 'temurin' java-version: '21' - name: build package - run: mvn '${{ vars.GOAL }}' \ No newline at end of file + run: mvn '${{ vars.GOAL }}'' \ No newline at end of file From 575769bc59b02cc2ded1ef0881a98c0432fc91de Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 13:36:48 +0530 Subject: [PATCH 14/24] updated --- .github/workflows/manual-mvn.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index 2017584a949..437cc1ea415 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -16,4 +16,4 @@ jobs: distribution: 'temurin' java-version: '21' - name: build package - run: mvn '${{ vars.GOAL }}'' \ No newline at end of file + run: mvn '${{ vars.GOAL }}' \ No newline at end of file From f85ad4f2e2330c585f4a3fdd742e6999e82ccbec Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 13:42:58 +0530 Subject: [PATCH 15/24] file --- .github/workflows/manual-mvn.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index 437cc1ea415..e4c3d2348b9 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -6,6 +6,7 @@ on: - main workflow_dispatch: + jobs: manual: runs-on: ubuntu-24.04 From b07570f71e302c0c32a1bcb481cacae3a4607687 Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 13:44:50 +0530 Subject: [PATCH 16/24] Adde publish test results --- .github/workflows/manual-mvn.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index e4c3d2348b9..c00698da4ad 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -4,9 +4,8 @@ on: pull_request: branches: - main - workflow_dispatch: - + jobs: manual: runs-on: ubuntu-24.04 @@ -17,4 +16,9 @@ jobs: distribution: 'temurin' java-version: '21' - name: build package - run: mvn '${{ vars.GOAL }}' \ No newline at end of file + run: mvn ${{ vars.GOAL }} + - name: publish test results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: | + **/target/surefire-reports/*.xml \ No newline at end of file From 8fbfeaf66ec89ea4f6025ab8c0bae0eb15ba4b45 Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 14:00:11 +0530 Subject: [PATCH 17/24] Added uploading jer file --- .github/workflows/manual-mvn.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index c00698da4ad..d658270fe7d 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -21,4 +21,11 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2 with: files: | - **/target/surefire-reports/*.xml \ No newline at end of file + **/target/surefire-reports/*.xml + + + - name: Uploading packaged jar files + uses: actions/upload-artifact@v4 + with: + name: spring-petclinic-jar + path: '**/target/*.jar' From bdd1b295b694b1b24e851ea8c3c81a08187867e7 Mon Sep 17 00:00:00 2001 From: ramu Date: Sat, 27 Sep 2025 14:34:54 +0530 Subject: [PATCH 18/24] Given some permissions --- .github/workflows/manual-mvn.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index d658270fe7d..1e048dec427 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -6,6 +6,10 @@ on: - main workflow_dispatch: +permissions: + contents: read + checks: write + jobs: manual: runs-on: ubuntu-24.04 @@ -15,6 +19,7 @@ jobs: with: distribution: 'temurin' java-version: '21' + cache: maven - name: build package run: mvn ${{ vars.GOAL }} - name: publish test results From 474b8526ac5b55d74a4901b1706ae1d16e200143 Mon Sep 17 00:00:00 2001 From: Rk-Yadav7899 Date: Mon, 29 Sep 2025 12:50:55 +0530 Subject: [PATCH 19/24] Added changes (#2) * Adde new files * Adde new changes --- .github/workflows/manual-mvn.yaml | 23 +++++++++++++++++-- .../petclinic/system/WelcomeController.java | 5 ++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index 1e048dec427..c943c746694 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -9,17 +9,25 @@ on: permissions: contents: read checks: write + pull-requests: 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: '21' + java-version: ${{ matrix.java }} cache: maven + - name: build package run: mvn ${{ vars.GOAL }} - name: publish test results @@ -32,5 +40,16 @@ jobs: - name: Uploading packaged jar files uses: actions/upload-artifact@v4 with: - name: spring-petclinic-jar + name: spring-petclinic-jar-${{ matrix.java }} path: '**/target/*.jar' + + - name: send email on failure + run: echo "everything seems problematic" + if: ${{ failure() }} + + + - name: send email on success + run: echo "everything seems fun" + if: ${{ success() }} + + 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 9224015bcd3..ee7a5b99ff5 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -27,4 +27,9 @@ public String welcome() { return "welcome"; } + @GetMapping("/message") + public String message() { + return "message"; + } + } From 0740f0ea69550edd58e8f9d0ebda73a44cfb4555 Mon Sep 17 00:00:00 2001 From: ramu Date: Mon, 29 Sep 2025 14:18:14 +0530 Subject: [PATCH 20/24] updated with codeQL --- .github/workflows/manual-mvn.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index c943c746694..03b7fa0ba56 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -27,9 +27,20 @@ jobs: distribution: 'temurin' java-version: ${{ matrix.java }} cache: maven + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: java # Specify the language to analyze + - name: build package run: mvn ${{ vars.GOAL }} + + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + - name: publish test results uses: EnricoMi/publish-unit-test-result-action@v2 with: @@ -43,13 +54,4 @@ jobs: name: spring-petclinic-jar-${{ matrix.java }} path: '**/target/*.jar' - - name: send email on failure - run: echo "everything seems problematic" - if: ${{ failure() }} - - - - name: send email on success - run: echo "everything seems fun" - if: ${{ success() }} - From 286f3f7d8fd4cefe6e94eacf0988a02f8cef5c51 Mon Sep 17 00:00:00 2001 From: ramu Date: Mon, 29 Sep 2025 15:20:17 +0530 Subject: [PATCH 21/24] updated permissions --- .github/workflows/manual-mvn.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index 03b7fa0ba56..40ca81783aa 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -10,6 +10,8 @@ permissions: contents: read checks: write pull-requests: write + security-events: write + actions: read jobs: From a535bf3541525557a0a5318dce1cbfc58cc3d09e Mon Sep 17 00:00:00 2001 From: ramu Date: Mon, 29 Sep 2025 15:28:38 +0530 Subject: [PATCH 22/24] Added new branch --- .../samples/petclinic/system/WelcomeController.java | 5 ----- 1 file changed, 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 ee7a5b99ff5..9224015bcd3 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -27,9 +27,4 @@ public String welcome() { return "welcome"; } - @GetMapping("/message") - public String message() { - return "message"; - } - } From d9e54bad4fe955284fe352672eaf26f3816e6639 Mon Sep 17 00:00:00 2001 From: ramu Date: Tue, 30 Sep 2025 07:03:46 +0530 Subject: [PATCH 23/24] updated files --- .github/workflows/manual-mvn.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index 40ca81783aa..b9d1dca9ce1 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -24,11 +24,20 @@ jobs: steps: - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ matrix.java }} cache: maven + + - uses: jfrog/setup-jfrog-cli@v4 + env: + JF_URL: ${{ vars.JF_URL }} + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + - run: | + jf --version + jf rt ping - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -56,4 +65,10 @@ jobs: name: spring-petclinic-jar-${{ matrix.java }} path: '**/target/*.jar' + - name: Maven Build and Deploy to Artifactory + run: | + jf mvn-config --repo-deploy-releases=learning-libs-release --repo-deploy-snapshots=learning-libs-snapshot + jf mvn deploy + jf rt bp # Optional: Deploy build info + From 4e90952e6edec65ef1b4307f425bca9253e9bc0a Mon Sep 17 00:00:00 2001 From: ramu Date: Tue, 30 Sep 2025 07:12:14 +0530 Subject: [PATCH 24/24] changed --- .github/workflows/manual-mvn.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-mvn.yaml b/.github/workflows/manual-mvn.yaml index b9d1dca9ce1..b999f7a5790 100644 --- a/.github/workflows/manual-mvn.yaml +++ b/.github/workflows/manual-mvn.yaml @@ -1,5 +1,6 @@ --- name: Manual maven steps for ci + on: pull_request: branches: @@ -30,7 +31,7 @@ jobs: distribution: 'temurin' java-version: ${{ matrix.java }} cache: maven - + - uses: jfrog/setup-jfrog-cli@v4 env: JF_URL: ${{ vars.JF_URL }}