-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Java 21 for Sonarcloud plugin (#7622)
Sonarcloud analyzer now requires at least Java 17.
- Loading branch information
1 parent
730fe76
commit ee47ef5
Showing
1 changed file
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,7 @@ name: SonarCloud QA | |
on: | ||
push: | ||
branches: | ||
- main | ||
- 4.0.x | ||
- 3.12.x | ||
- geocat_v4.2.3_report_custom | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
|
@@ -19,12 +17,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' | ||
|
@@ -37,11 +32,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 | ||
|