This commit is contained in:
@@ -11,28 +11,28 @@ jobs:
|
|||||||
sonarqube:
|
sonarqube:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: 1. Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: 2. Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
- name: Setup Java
|
- name: 3. Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
|
||||||
- name: Install SonarScanner for .NET
|
- name: 4. Install SonarScanner for .NET
|
||||||
run: |
|
run: |
|
||||||
dotnet tool install --global dotnet-sonarscanner
|
dotnet tool install --global dotnet-sonarscanner
|
||||||
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
|
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Debug token sanity check
|
- name: 5. Debug token sanity check
|
||||||
run: |
|
run: |
|
||||||
curl -s -w "\nHTTP %{http_code}\n" \
|
curl -s -w "\nHTTP %{http_code}\n" \
|
||||||
-u "${{ secrets.SONAR_TOKEN }}:" \
|
-u "${{ secrets.SONAR_TOKEN }}:" \
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
-u "${{ secrets.SONAR_TOKEN }}:" \
|
-u "${{ secrets.SONAR_TOKEN }}:" \
|
||||||
"${{ secrets.SONAR_HOST_URL }}/api/authentication/validate"
|
"${{ secrets.SONAR_HOST_URL }}/api/authentication/validate"
|
||||||
|
|
||||||
- name: SonarScanner Begin
|
- name: 6. SonarScanner Begin
|
||||||
run: |
|
run: |
|
||||||
dotnet sonarscanner begin \
|
dotnet sonarscanner begin \
|
||||||
/k:"sql-utilities" \
|
/k:"sql-utilities" \
|
||||||
@@ -51,10 +51,10 @@ jobs:
|
|||||||
/d:sonar.exclusions="**/bin/**,**/obj/**" \
|
/d:sonar.exclusions="**/bin/**,**/obj/**" \
|
||||||
/d:sonar.verbose=true
|
/d:sonar.verbose=true
|
||||||
|
|
||||||
- name: Build
|
- name: 7. Build
|
||||||
run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release
|
run: dotnet build Strata.SqlTools.QueryBreakdown.sln --configuration Release
|
||||||
|
|
||||||
- name: Test plugins endpoint from runner
|
- name: 8. Test plugins endpoint from runner
|
||||||
run: |
|
run: |
|
||||||
echo "Test 1: curl with token via Basic auth"
|
echo "Test 1: curl with token via Basic auth"
|
||||||
curl -s -w "\nHTTP %{http_code}\n" \
|
curl -s -w "\nHTTP %{http_code}\n" \
|
||||||
@@ -72,5 +72,5 @@ jobs:
|
|||||||
-H "User-Agent: ScannerCLI/5.0.2.4997" \
|
-H "User-Agent: ScannerCLI/5.0.2.4997" \
|
||||||
"${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2
|
"${{ secrets.SONAR_HOST_URL }}/api/plugins/installed" | tail -2
|
||||||
|
|
||||||
- name: SonarScanner End
|
- name: 9. SonarScanner End
|
||||||
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user