From 710b3842fddfec12e87de74127d90ec175caa8cc Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 15:15:42 +0530 Subject: [PATCH 01/13] code test --- .github/workflows/main.yml | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..951155cb6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,52 @@ +name: vprofile action +on: workflow_dispatch +env: + AWS_REGION: us-east-1 + ECR_REPOSITORY: vprofileapp + EKS_CLUSTER: vprofile-eks + +jobs: + Testing: + runs-on: ubuntu-latest + steps: + - name: Code checkout + uses: actions/checkout@v4 + + - name: Maven test + run: mvn test + + - name: checkstyle + run: mvn checkstyle:checkstyle + + - name: Set Java 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + + #setup sonar scanner + - name: Setup SonarQube + uses: warchant/setup-sonar-scanner@v7 + + #run sonar scanner + - name: Setup SonarQube + run: sonar-scanner + - Dsonar.host.url=${{ secrets.SONAR_URL }} + - Dsonar.login=${{ secrets.SONAR_TOKEN }} + - Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} + - Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} + - Dsonar.sources=src/ + - Dsonar.junit.reportPaths=target/surefire-reports/ + - Dsonar.jacoco.reportPaths=target/jacoco.exec + - Dsonar.java.checklist.reportPaths=/target/checkstyle-result.xml + - Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ + + # check the quality gate status + - name: SonarQube Quality Gate Check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@master + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_URL }} + From 8b30ea2b444720cca9c9ed5181c6c4086ec1de3f Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 15:21:03 +0530 Subject: [PATCH 02/13] code test 1 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 951155cb6..b85e5c384 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - Dsonar.java.checklist.reportPaths=/target/checkstyle-result.xml - Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ - # check the quality gate status + # ##check the quality gate status - name: SonarQube Quality Gate Check id: sonarqube-quality-gate-check uses: sonarsource/sonarqube-quality-gate-action@master From 1ec075fac39818bfc05d3d53156a6d0aa94cfeab Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 15:43:47 +0530 Subject: [PATCH 03/13] get code 1 --- .github/workflows/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b85e5c384..33569060b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,17 +29,17 @@ jobs: uses: warchant/setup-sonar-scanner@v7 #run sonar scanner - - name: Setup SonarQube + - name: Run SonarQube Scanner run: sonar-scanner - - Dsonar.host.url=${{ secrets.SONAR_URL }} - - Dsonar.login=${{ secrets.SONAR_TOKEN }} - - Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} - - Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} - - Dsonar.sources=src/ - - Dsonar.junit.reportPaths=target/surefire-reports/ - - Dsonar.jacoco.reportPaths=target/jacoco.exec - - Dsonar.java.checklist.reportPaths=/target/checkstyle-result.xml - - Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ + -Dsonar.host.url=${{ secrets.SONAR_URL }} + -Dsonar.login=${{ secrets.SONAR_TOKEN }} + -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} + -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} + -Dsonar.sources=src/ + -Dsonar.junit.reportPaths=target/surefire-reports/ + -Dsonar.jacoco.reportPaths=target/jacoco.exec + -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml + -Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ # ##check the quality gate status - name: SonarQube Quality Gate Check From 656d16b505b67ec5ddf8250fc07787a86ae10b57 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 15:46:11 +0530 Subject: [PATCH 04/13] code start --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 33569060b..7df9028e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ - # ##check the quality gate status + #check the quality gate status - name: SonarQube Quality Gate Check id: sonarqube-quality-gate-check uses: sonarsource/sonarqube-quality-gate-action@master From be43567280cecc9c2516048896f938e149950492 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 15:49:12 +0530 Subject: [PATCH 05/13] code1 test --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7df9028e5..712e5f2c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ - #check the quality gate status + ###check the quality gate status - name: SonarQube Quality Gate Check id: sonarqube-quality-gate-check uses: sonarsource/sonarqube-quality-gate-action@master From 51f185a0f7a7788eff39fd124e8058f0aacba8bc Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 15:50:45 +0530 Subject: [PATCH 06/13] code_test_terra --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 712e5f2c6..7df9028e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ - ###check the quality gate status + #check the quality gate status - name: SonarQube Quality Gate Check id: sonarqube-quality-gate-check uses: sonarsource/sonarqube-quality-gate-action@master From 8495f9d8ae89347339fde4c26fa1d2bbe985de13 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 16:11:24 +0530 Subject: [PATCH 07/13] fix: pin sonar-scanner to 4.8.0 to fix SonarCloud API 404 --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7df9028e5..ea1cef935 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,8 @@ jobs: #setup sonar scanner - name: Setup SonarQube uses: warchant/setup-sonar-scanner@v7 + with: + version: 4.8.0.2856 #run sonar scanner - name: Run SonarQube Scanner From 7e93ff7cdf0e46c3dc6b871a14c4b1fe32504385 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Mon, 30 Mar 2026 16:17:03 +0530 Subject: [PATCH 08/13] fix: manually install sonar-scanner 4.8.0 to avoid 5.x API incompatibility --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea1cef935..34851f6ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,9 +26,10 @@ jobs: #setup sonar scanner - name: Setup SonarQube - uses: warchant/setup-sonar-scanner@v7 - with: - version: 4.8.0.2856 + run: | + wget -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.0.2856-linux.zip + unzip -q sonar-scanner-cli-4.8.0.2856-linux.zip + echo "$GITHUB_WORKSPACE/sonar-scanner-4.8.0.2856-linux/bin" >> $GITHUB_PATH #run sonar scanner - name: Run SonarQube Scanner From 02ae5826e70cfd9ab73ccce03701994d0651263c Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Tue, 31 Mar 2026 11:46:46 +0530 Subject: [PATCH 09/13] fix: manually install sonar-scanner --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 34851f6ab..290970e73 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: unzip -q sonar-scanner-cli-4.8.0.2856-linux.zip echo "$GITHUB_WORKSPACE/sonar-scanner-4.8.0.2856-linux/bin" >> $GITHUB_PATH - #run sonar scanner + ###run sonar scanner - name: Run SonarQube Scanner run: sonar-scanner -Dsonar.host.url=${{ secrets.SONAR_URL }} From 3b8e265c0bcb06f09458ccab61f3ae86bd4b6a6f Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Tue, 31 Mar 2026 12:55:22 +0530 Subject: [PATCH 10/13] fix: use full path to sonar-scanner 4.8.0 to bypass cached 5.x --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 290970e73..df0a10a7e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,9 +31,9 @@ jobs: unzip -q sonar-scanner-cli-4.8.0.2856-linux.zip echo "$GITHUB_WORKSPACE/sonar-scanner-4.8.0.2856-linux/bin" >> $GITHUB_PATH - ###run sonar scanner + #run sonar scanner - name: Run SonarQube Scanner - run: sonar-scanner + run: $GITHUB_WORKSPACE/sonar-scanner-4.8.0.2856-linux/bin/sonar-scanner -Dsonar.host.url=${{ secrets.SONAR_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} From 41385070c7e8d43e00be9adab9d363a0af69cd62 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Tue, 31 Mar 2026 15:30:42 +0530 Subject: [PATCH 11/13] fix: use SonarSource/sonarqube-scan-action to avoid runner cached 5.x scanner --- .github/workflows/main.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df0a10a7e..04da0ced8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,18 +24,14 @@ jobs: java-version: '11' distribution: 'temurin' - #setup sonar scanner - - name: Setup SonarQube - run: | - wget -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.0.2856-linux.zip - unzip -q sonar-scanner-cli-4.8.0.2856-linux.zip - echo "$GITHUB_WORKSPACE/sonar-scanner-4.8.0.2856-linux/bin" >> $GITHUB_PATH - #run sonar scanner - name: Run SonarQube Scanner - run: $GITHUB_WORKSPACE/sonar-scanner-4.8.0.2856-linux/bin/sonar-scanner - -Dsonar.host.url=${{ secrets.SONAR_URL }} - -Dsonar.login=${{ secrets.SONAR_TOKEN }} + uses: SonarSource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_URL }} + with: + args: > -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.sources=src/ From f77fea5a53562ff1221268b4eccc10b39ed53954 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Tue, 31 Mar 2026 15:43:06 +0530 Subject: [PATCH 12/13] fix: add sonar.newCode.referenceBranch to resolve 404 on analysis/analyses --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04da0ced8..b1af42525 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: -Dsonar.jacoco.reportPaths=target/jacoco.exec -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ + -Dsonar.newCode.referenceBranch=main #check the quality gate status - name: SonarQube Quality Gate Check From df2c0995aa6046e2db7ae1e77ff05e2f5e1e0df6 Mon Sep 17 00:00:00 2001 From: yogeshmoharkar Date: Tue, 31 Mar 2026 16:03:13 +0530 Subject: [PATCH 13/13] fix: switch to mvn sonar:sonar to avoid sonar-scanner 5.x SonarCloud 404 bug --- .github/workflows/main.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1af42525..23267a4da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,20 +26,12 @@ jobs: #run sonar scanner - name: Run SonarQube Scanner - uses: SonarSource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_URL }} - with: - args: > - -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} + run: | + mvn sonar:sonar \ + -Dsonar.host.url=${{ secrets.SONAR_URL }} \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ + -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} \ -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} - -Dsonar.sources=src/ - -Dsonar.junit.reportPaths=target/surefire-reports/ - -Dsonar.jacoco.reportPaths=target/jacoco.exec - -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml - -Dsonar.java.binaries=target/test-classes/visualpathit/account/controllerTest/ - -Dsonar.newCode.referenceBranch=main #check the quality gate status - name: SonarQube Quality Gate Check