From 7e8c9931535f403c4eee244050922a159ac8f54f Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Tue, 11 Nov 2025 14:32:25 +0000 Subject: [PATCH 01/21] Add SonarCloud analysis to Maven workflow --- .github/workflows/maven.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5a1c2c5..ed24d47 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -31,6 +31,7 @@ on: permissions: contents: read + pull-requests: read env: MAVEN_CLI_OPTS: "--batch-mode --no-transfer-progress" @@ -40,6 +41,9 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v5 + with: + # Full history is recommended for accurate Sonar analysis and PR decoration + fetch-depth: 0 - name: Set up JDK 21 uses: actions/setup-java@v5 with: @@ -51,6 +55,13 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify + - name: SonarCloud analysis + # Uses the SonarCloud GitHub App for auth (no tokens/secrets needed) + uses: sonarsource/sonarcloud-github-action@v2 + with: + # Coverage report produced by JaCoCo during 'mvn verify' + args: > + -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report if: always() uses: actions/upload-artifact@v4 From e30f0e389fa88c86f35cc789a4264e5261418166 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Tue, 11 Nov 2025 14:46:55 +0000 Subject: [PATCH 02/21] Update Maven workflow to include project key and organization for SonarCloud analysis --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ed24d47..348e754 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -56,11 +56,11 @@ jobs: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify - name: SonarCloud analysis - # Uses the SonarCloud GitHub App for auth (no tokens/secrets needed) uses: sonarsource/sonarcloud-github-action@v2 with: - # Coverage report produced by JaCoCo during 'mvn verify' args: > + -Dsonar.projectKey=management-node + -Dsonar.organization=National-Digital-Twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report if: always() From 7e610f594ca1c2999554046550c6556bd150dd7c Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:26:04 +0000 Subject: [PATCH 03/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 348e754..b6c944f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -57,6 +57,8 @@ jobs: run: ./mvnw $MAVEN_CLI_OPTS verify - name: SonarCloud analysis uses: sonarsource/sonarcloud-github-action@v2 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: args: > -Dsonar.projectKey=management-node From 60c65004969e03729cfcf94ded50a07dbaf15657 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:31:04 +0000 Subject: [PATCH 04/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b6c944f..93ea769 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -56,7 +56,7 @@ jobs: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify - name: SonarCloud analysis - uses: sonarsource/sonarcloud-github-action@v2 + uses: sonarsource/sonarqube-scan-action@v4.2.2 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: From b924c2473b5fbf99c498f876bb832c7f890bd6c2 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:34:25 +0000 Subject: [PATCH 05/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 93ea769..3ab746c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -61,7 +61,6 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: args: > - -Dsonar.projectKey=management-node -Dsonar.organization=National-Digital-Twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report From 383aec7c807bd30aa04803d608c0c18dddb95126 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:37:04 +0000 Subject: [PATCH 06/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3ab746c..5c03fb0 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -61,6 +61,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: args: > + -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=National-Digital-Twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report From d07c91a7ed30603d1a21021401eeb51767ddf090 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:39:05 +0000 Subject: [PATCH 07/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5c03fb0..1bc7116 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -62,7 +62,6 @@ jobs: with: args: > -Dsonar.projectKey=National-Digital-Twin_management-node - -Dsonar.organization=National-Digital-Twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report if: always() From 8412aa062b353fe1ed627e2269cb2447b6ab856e Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:44:50 +0000 Subject: [PATCH 08/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1bc7116..d20b14e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -62,6 +62,7 @@ jobs: with: args: > -Dsonar.projectKey=National-Digital-Twin_management-node + -Dsonar.organization=National Digital Twin programme -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report if: always() From f44e3569e1bf41ed0537e6f2df7e3e62a43e8835 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:48:30 +0000 Subject: [PATCH 09/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d20b14e..6633ebd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -62,7 +62,7 @@ jobs: with: args: > -Dsonar.projectKey=National-Digital-Twin_management-node - -Dsonar.organization=National Digital Twin programme + -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report if: always() From 982bbb344c6e063ab6be06a22e221bd56ea3570f Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 10:55:01 +0000 Subject: [PATCH 10/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6633ebd..24c71fc 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -55,15 +55,6 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify - - name: SonarCloud analysis - uses: sonarsource/sonarqube-scan-action@v4.2.2 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.projectKey=National-Digital-Twin_management-node - -Dsonar.organization=national-digital-twin - -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml - name: Upload JaCoCo HTML report if: always() uses: actions/upload-artifact@v4 From 4e29f7c45ee334b7e50de02de979ff2e644d5632 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:10:59 +0000 Subject: [PATCH 11/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 24c71fc..2b4b77a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -55,13 +55,10 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify - - name: Upload JaCoCo HTML report - if: always() - uses: actions/upload-artifact@v4 - with: - name: jacoco-report - path: target/site/jacoco - if-no-files-found: warn + - name: run code coverage + env: + GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From c4522f8617ae7312102d8ae60c80793385c60bcf Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:14:19 +0000 Subject: [PATCH 12/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2b4b77a..b2cdce5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -58,7 +58,7 @@ jobs: - name: run code coverage env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From c900ce2dc3d804aa0b4ec9a2ebd5c7e793a43703 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:16:02 +0000 Subject: [PATCH 13/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b2cdce5..0c9325c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -58,6 +58,7 @@ jobs: - name: run code coverage env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest From cd3b9a62ec9f18088ffad13a883cae1e2afe6fe0 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:19:16 +0000 Subject: [PATCH 14/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0c9325c..2b4b77a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -58,8 +58,7 @@ jobs: - name: run code coverage env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From db0dd18051ac5982f4a9fb9682cc5f9932df8dbd Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:21:40 +0000 Subject: [PATCH 15/21] Add SONAR_TOKEN environment variable to Maven workflow for SonarCloud analysis --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2b4b77a..edb55e4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -58,7 +58,7 @@ jobs: - name: run code coverage env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From e853f809e0e394e45b5162d143d696ea74b862ee Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:36:16 +0000 Subject: [PATCH 16/21] Add SONAR_TOKEN and update Maven workflow with projectKey for SonarCloud analysis --- .github/workflows/maven.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index edb55e4..59ec414 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -58,7 +58,8 @@ jobs: - name: run code coverage env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=national-digital-twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From 9630dd5e2135057be52b48f9dbe828172ca4ffea Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:38:32 +0000 Subject: [PATCH 17/21] Add SONAR_TOKEN and update Maven workflow with projectKey for SonarCloud analysis --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 59ec414..1250799 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -59,7 +59,7 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=national-digital-twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=national-digital-twin -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From 0795c2b7b68aa588ab4840785fc49ad4765cb856 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:43:47 +0000 Subject: [PATCH 18/21] Add SONAR_TOKEN and update Maven workflow with projectKey for SonarCloud analysis --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1250799..1d4e027 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -59,7 +59,7 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=national-digital-twin -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From 5de09b7a252f9ca65a12f6d522d10a6977a3a759 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:46:35 +0000 Subject: [PATCH 19/21] Add SONAR_TOKEN and update Maven workflow with projectKey for SonarCloud analysis --- sonar-project.properties | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..2d780d8 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=National-Digital-Twin_management-node +sonar.organization=national-digital-twin +sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ No newline at end of file From 7e3337289528071aa6b2c01fefc8c791c8e2f2d7 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 11:46:45 +0000 Subject: [PATCH 20/21] Add SONAR_TOKEN and update Maven workflow with projectKey for SonarCloud analysis --- .github/workflows/maven.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1d4e027..7abc9b7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -55,11 +55,11 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify - - name: run code coverage - env: - GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage +# - name: run code coverage +# env: +# GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +# run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: From 6a2213fc97115050fab0e9308ba815ce59504c98 Mon Sep 17 00:00:00 2001 From: nikan Negaresh Date: Mon, 17 Nov 2025 12:53:04 +0000 Subject: [PATCH 21/21] Add SONAR_TOKEN and update Maven workflow with projectKey for SonarCloud analysis --- .github/workflows/maven.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7abc9b7..1d4e027 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -55,11 +55,11 @@ jobs: env: GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} run: ./mvnw $MAVEN_CLI_OPTS verify -# - name: run code coverage -# env: -# GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} -# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} -# run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage + - name: run code coverage + env: + GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./mvnw $MAVEN_CLI_OPTS -Dsonar.projectKey=National-Digital-Twin_management-node -Dsonar.organization=national-digital-twin -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pcoverage lint: runs-on: ubuntu-latest steps: