From 9e926919d5afa39cfa039180706dc1d132b23ba9 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:03:39 +0530 Subject: [PATCH 1/7] updated version of codeql and java in sast.yaml --- .github/workflows/build-on-pull-request.yml | 2 +- .github/workflows/sast.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 15342f7c..c871509c 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -14,7 +14,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: 17 distribution: 'adopt' diff --git a/.github/workflows/sast.yml b/.github/workflows/sast.yml index 2f602974..c61cf533 100644 --- a/.github/workflows/sast.yml +++ b/.github/workflows/sast.yml @@ -35,18 +35,20 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 + with: + languages: ${{matrix.language}} - name: Setup JDK 17 uses: actions/setup-java@v2 with: java-version: 17 - distribution: 'adopt' + distribution: 'temurin' - name: Build with Maven run: mvn clean install - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" From 849316403f05b03fdd940de9836b1ec8a8cbf575 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:03:54 +0530 Subject: [PATCH 2/7] updated version of codeql and java in sast.yaml --- .github/workflows/sast.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sast.yml b/.github/workflows/sast.yml index c61cf533..578edc09 100644 --- a/.github/workflows/sast.yml +++ b/.github/workflows/sast.yml @@ -40,7 +40,7 @@ jobs: languages: ${{matrix.language}} - name: Setup JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: 17 distribution: 'temurin' From bf41c811141a66ffba7aa037659801115b5f4a03 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:09:18 +0530 Subject: [PATCH 3/7] updated version of codeql and java in all action files --- .github/workflows/build-on-pull-request.yml | 2 +- .github/workflows/package.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index c871509c..db853c65 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -17,6 +17,6 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: 'adopt' + distribution: 'termurin' - name: Build with Maven run: mvn clean install diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 69a358ae..e920cf1b 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -23,10 +23,10 @@ jobs: uses: actions/checkout@v3 - name: Setup JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: 17 - distribution: 'adopt' + distribution: 'termurin' - name: Build with Maven run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }} From 8ee1a114fdf069ce065e8c1128867555338dee97 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:11:20 +0530 Subject: [PATCH 4/7] spelling error fixed --- .github/workflows/build-on-pull-request.yml | 2 +- .github/workflows/package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index db853c65..97796d94 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -17,6 +17,6 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: 'termurin' + distribution: 'temurin' - name: Build with Maven run: mvn clean install diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index e920cf1b..0f215261 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -26,7 +26,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: 'termurin' + distribution: 'temurin' - name: Build with Maven run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }} From 479779a78d25e17ec307945e954f6140989572c9 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:16:23 +0530 Subject: [PATCH 5/7] error resolution --- .github/workflows/sast.yml | 45 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/sast.yml b/.github/workflows/sast.yml index 578edc09..a2d5781d 100644 --- a/.github/workflows/sast.yml +++ b/.github/workflows/sast.yml @@ -4,12 +4,12 @@ on: push: branches: [ "develop" ] paths-ignore: - - target/** - + - target/** + pull_request: branches: [ "develop" ] paths-ignore: - - target/** + - target/** jobs: analyze: @@ -25,30 +25,29 @@ jobs: fail-fast: false matrix: language: [ 'java' ] - + steps: - - name: Checkout code - uses: actions/checkout@v3 - with: + - name: Checkout code + uses: actions/checkout@v3 + with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{matrix.language}} + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} - - name: Setup JDK 17 - uses: actions/setup-java@v4 - with: + - name: Setup JDK 17 + uses: actions/setup-java@v4 + with: java-version: 17 distribution: 'temurin' - - - name: Build with Maven - run: mvn clean install - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" + + - name: Build with Maven + run: mvn clean install + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" From e1aa4d6f2c2dcb7ee869304babbd972550395df7 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:17:44 +0530 Subject: [PATCH 6/7] error resolution --- .github/workflows/package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 0f215261..f3aaaeb8 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -21,19 +21,19 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - + - name: Setup JDK 17 uses: actions/setup-java@v4 with: java-version: 17 distribution: 'temurin' - + - name: Build with Maven run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }} - + - name: Build WAR file run: mvn -B package --file pom.xml - + - name: Upload WAR file as artifact uses: actions/upload-artifact@v4 From eed8215075a954c954ab0dc6beb2a22e456fe663 Mon Sep 17 00:00:00 2001 From: techy4shri Date: Mon, 21 Apr 2025 16:47:32 +0530 Subject: [PATCH 7/7] prerequisites listed --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b011397d..8bee9eb0 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ Common API is a microservice whch acts as a gateway for AMRIT. There are many AP ## Environment and Setup For setting up the development environment, please refer to the [Developer Guide](https://piramal-swasthya.gitbook.io/amrit/developer-guide/development-environment-setup) . +Prerequisites +* JDK 17 +* Maven +* Springboot V2 +* MySQL ## API Guide Detailed information on API endpoints can be found in the [API Guide](https://piramal-swasthya.gitbook.io/amrit/architecture/api-guide).