Skip to content

Commit

Permalink
Use Java 21 for Sonarcloud plugin (#7622)
Browse files Browse the repository at this point in the history
Sonarcloud analyzer now requires at least Java 17.
  • Loading branch information
juanluisrp authored and cmangeat committed Jan 23, 2024
1 parent 730fe76 commit 4abc6a8
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: 'recursive'
# For building GeoNetwork, JDK8 is necessary, but for running
# the SonarQube plugin, JDK11 is necessary.
# So, first install JDK 8, build GeoNetwork, then install JDK11
# and run SonarQube:
- name: Set up JDK 8
uses: actions/[email protected]
show-progress: 'false'
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: 8
distribution: 'temurin'
Expand All @@ -37,11 +34,13 @@ jobs:
restore-keys: ${{ runner.os }}-sonar
- name: Build GN
run: mvn -B package -DskipTests
- name: Set up JDK 11
uses: actions/[email protected]

- name: Set up JDK 21 # Sonarcloud analyzer needs at least JDK 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
cache: 'maven'
- name: Analyze with Sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down

0 comments on commit 4abc6a8

Please sign in to comment.