From 74a494ed0aaf44eb3a4341555b65833ec66b7f82 Mon Sep 17 00:00:00 2001 From: Tore Martin Hagen Date: Tue, 26 May 2026 13:15:03 +0200 Subject: [PATCH 1/2] Run sonar scan every 2nd day since we saw that sonar cleaned out the old scan after 11 days --- .github/workflows/sonar-for-cli-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar-for-cli-testing.yml b/.github/workflows/sonar-for-cli-testing.yml index 9dea2978..8a49c167 100644 --- a/.github/workflows/sonar-for-cli-testing.yml +++ b/.github/workflows/sonar-for-cli-testing.yml @@ -14,7 +14,7 @@ name: SonarCloud for CLI Testing on: schedule: - - cron: '0 2 1,15 * *' # 1st and 15th of each month at 02:00 UTC + - cron: '0 2 */2 * *' # every 2nd day at 02:00 UTC workflow_dispatch: permissions: From d22f1cebb4bed14e74009cb3e69e626a7e2d8f37 Mon Sep 17 00:00:00 2001 From: Tore Martin Hagen Date: Tue, 26 May 2026 14:19:14 +0200 Subject: [PATCH 2/2] Tag main scan with sonar.projectVersion to trigger Version events SonarCloud retains version-tagged analyses longer than intermediate ones. Pass a unique projectVersion per run so each main scan creates a Version event and survives housekeeping longer. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/sonar-for-cli-testing.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/sonar-for-cli-testing.yml b/.github/workflows/sonar-for-cli-testing.yml index 8a49c167..b03b8410 100644 --- a/.github/workflows/sonar-for-cli-testing.yml +++ b/.github/workflows/sonar-for-cli-testing.yml @@ -116,6 +116,9 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} uses: SonarSource/sonarqube-scan-action@v6.0.0 + with: + args: > + -Dsonar.projectVersion=cli-test-${{ github.run_number }} # The Kosli CLI integration tests need a valid SonarCloud report-task.txt # from a main branch scan. Upload it as an artifact so the CLI tests can download it.