This is an automated email from the ASF dual-hosted git repository.

HackedRico pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/caldera.git


The following commit(s) were added to refs/heads/master by this push:
     new 4596ce21 ci: point SonarCloud analysis at the ASF project 
(apache/apache_caldera) (#3448)
4596ce21 is described below

commit 4596ce2158ebab554dd3daffc3dac6f90fffcc32
Author: deacon-mp <[email protected]>
AuthorDate: Tue Dec 1 14:22:49 2026 -0500

    ci: point SonarCloud analysis at the ASF project (apache/apache_caldera) 
(#3448)
    
    * ci: point SonarCloud analysis at the ASF project (apache/apache_caldera)
    
    Update sonar-project.properties and the Sonar workflows to use organization 
apache and project key apache_caldera (INFRA-28688), replacing the pre-donation 
mitre project. The scan needs a SONAR_TOKEN valid for the apache SonarCloud org.
    
    * Apply suggestion from @HackedRico
    
    * ci: read the SonarCloud token from SONARCLOUD_TOKEN
    
    The scan step fails with HTTP 403 because SONAR_TOKEN is the repo secret 
from before the donation. The apache org token is shared with this repo as 
SONARCLOUD_TOKEN.
    
    * Apply suggestion from @HackedRico
    
    * ci: read SONARCLOUD_TOKEN in the fork PR scan
    
    quality.yml reads the apache org token from SONARCLOUD_TOKEN. The fork PR 
scan still read SONAR_TOKEN, the repo secret from before the donation, which 
SonarCloud rejects with HTTP 403.
    
    * Apply suggestion from @HackedRico
    
    * Update SonarQube scan action to continue on error
    
    Allow SonarQube scan to continue on error in workflow.
    
    Co-authored-by: Copilot Autofix powered by AI 
<[email protected]>
    
    ---------
    
    Co-authored-by: Ricky Chen <[email protected]>
    Co-authored-by: Copilot Autofix powered by AI 
<[email protected]>
---
 .github/workflows/quality.yml       | 5 +----
 .github/workflows/sonar-fork-pr.yml | 6 +++---
 sonar-project.properties            | 4 ++--
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 0cb359dc..87528dce 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -61,14 +61,11 @@ jobs:
         # empty and the scan can only fail; skip it there. The merged result 
is still
         # scanned by the push-event run on master.
         if: ${{ github.event_name == 'push' || (github.event_name == 
'pull_request' && github.event.pull_request.head.repo.fork == false && 
github.actor != 'dependabot[bot]') }}
-        # SonarCloud currently rejects the configured token (HTTP 403). Until 
the
-        # project is set up in the ASF SonarCloud organization, report a failed
-        # scan as a warning instead of failing the tests that already passed.
         continue-on-error: true
         uses: 
SonarSource/sonarqube-scan-action@59202af334b4ba7b5db01b701b8e79f8b3bef0f4  # 
v8.5.0
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
 
       # ------------------------------------------------------------------
       # Fork PR analysis is handed off to the trusted .github/workflows/
diff --git a/.github/workflows/sonar-fork-pr.yml 
b/.github/workflows/sonar-fork-pr.yml
index 52b1ca42..e2a41026 100644
--- a/.github/workflows/sonar-fork-pr.yml
+++ b/.github/workflows/sonar-fork-pr.yml
@@ -140,7 +140,7 @@ jobs:
       - name: SonarQube Scan (fork PR, trusted base)
         uses: 
SonarSource/sonarqube-scan-action@59202af334b4ba7b5db01b701b8e79f8b3bef0f4  # 
v8.5.0
         env:
-          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         with:
           # Run from the TRUSTED base checkout so the trusted root
@@ -149,8 +149,8 @@ jobs:
           projectBaseDir: .
           args: >-
             -Dsonar.host.url=https://sonarcloud.io
-            -Dsonar.organization=mitre
-            -Dsonar.projectKey=mitre_caldera
+            -Dsonar.organization=apache
+            -Dsonar.projectKey=apache_caldera
             -Dsonar.sources=pr-src/app
             -Dsonar.python.coverage.reportPaths=coverage.xml
             -Dsonar.pullrequest.key=${{ steps.meta.outputs.pr_number }}
diff --git a/sonar-project.properties b/sonar-project.properties
index 7e4987ea..5679123e 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -1,5 +1,5 @@
-sonar.projectKey=mitre_caldera
-sonar.organization=mitre
+sonar.projectKey=apache_caldera
+sonar.organization=apache
 
 # This is the name and version displayed in the SonarCloud UI.
 sonar.projectName=caldera

Reply via email to