Fix SonarQube scan Java version mismatch
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Has been cancelled

- Updated SonarQube action from kitabisa/sonarqube-action@v1.2.0 to sonarsource/sonarqube-scan-action@v4
- Official action uses Java 17, compatible with SonarQube 25.10
- Added sonar-project.properties with Terraform-specific exclusions
- Fixes: java.lang.UnsupportedClassVersionError (class file version 61.0 vs 55.0)
This commit is contained in:
Patrick de Ruiter 2025-11-01 20:36:15 +01:00
parent 171d476941
commit bcb3110e03
Signed by: pderuiter
GPG Key ID: 5EBA7F21CF583321
2 changed files with 17 additions and 4 deletions

View File

@ -17,7 +17,7 @@ jobs:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarQube Scan
uses: kitabisa/sonarqube-action@v1.2.0
with:
host: ${{ secrets.SONARQUBE_HOST }}
login: ${{ secrets.SONARQUBE_TOKEN }}
uses: sonarsource/sonarqube-scan-action@v4
env:
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}

13
sonar-project.properties Normal file
View File

@ -0,0 +1,13 @@
# SonarQube Project Configuration
sonar.projectKey=terraform-vsphere-resourcegroups
sonar.projectName=Terraform vSphere Resource Groups
sonar.projectVersion=1.0
# Source code location
sonar.sources=.
# Exclusions
sonar.exclusions=**/.terraform/**,**/*.tfstate,**/*.tfstate.backup,**/.gitea/**
# Terraform specific settings
sonar.sourceEncoding=UTF-8