From 3785705b10715c62558d512f08510ea5a057a051 Mon Sep 17 00:00:00 2001 From: bermudalamb Date: Fri, 15 May 2026 16:25:14 -0500 Subject: [PATCH] Update .gitea/workflows/sonarqube.yml --- .gitea/workflows/sonarqube.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitea/workflows/sonarqube.yml b/.gitea/workflows/sonarqube.yml index aa25f06..301617a 100644 --- a/.gitea/workflows/sonarqube.yml +++ b/.gitea/workflows/sonarqube.yml @@ -54,5 +54,23 @@ jobs: - name: Build run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release + - name: Test plugins endpoint from runner + run: | + echo "Test 1: curl with token via Basic auth" + curl -s -w "\nHTTP %{http_code}\n" \ + -u "${{ secrets.SONAR_TOKEN }}:" \ + "${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2 + echo "---" + echo "Test 2: curl with token via Bearer auth" + curl -s -w "\nHTTP %{http_code}\n" \ + -H "Authorization: Bearer ${{ secrets.SONAR_TOKEN }}" \ + "${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2 + echo "---" + echo "Test 3: same Java User-Agent the scanner uses" + curl -s -w "\nHTTP %{http_code}\n" \ + -u "${{ secrets.SONAR_TOKEN }}:" \ + -H "User-Agent: ScannerCLI/5.0.2.4997" \ + "${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2 + - name: SonarScanner End run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"