Skip to content

ci: use JDK 21 for SonarScanner - #16

Merged
amagan merged 2 commits into
developfrom
fix/sonar-scanner-java21
Aug 7, 2026
Merged

ci: use JDK 21 for SonarScanner#16
amagan merged 2 commits into
developfrom
fix/sonar-scanner-java21

Conversation

@amagan

@amagan amagan commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The SonarCloud analysis job fails at the SonarCloud / Run analysis step with:

The version of Java (17) used to run this analysis is deprecated, and SonarQube Cloud no longer supports it. Please upgrade to Java 21.

npx sonar-scanner was using the runner's default JDK 17. This adds an actions/setup-java@v5 step (Temurin 21) before the analysis steps so the scanner runs on a supported JVM.

Notes

  • Everything else in the Sonar setup is already correct: project bound, SONAR_TOKEN granted, Automatic Analysis disabled, SONARCLOUD_ENABLED=true, tests + coverage passing, scanner connecting to org inditextech.
  • This workflow looks like a shared corporate npm template; the same fix is being escalated upstream so it applies to all InditexTech npm OSS repos.

SonarQube Cloud no longer supports Java 17 for analysis and fails with "Please upgrade to Java 21". Add a setup-java step (temurin 21) before the sonar-scanner invocation so the scanner runs on a supported JVM.
@amagan
amagan requested a review from a team as a code owner August 6, 2026 11:33
Address setup-java v4 deprecation warning and satisfy prettier format:check (double-quoted java-version).
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@amagan
amagan merged commit e24b06a into develop Aug 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants