Skip to content

Commit bce5a21

Browse files
committed
Use maven for SonarCloud analysis
1 parent 69e9f8b commit bce5a21

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

.github/workflows/java-continuous-integration.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
name: Java CI
99

1010
on: [push, pull_request]
11+
env:
12+
MVN_USR: dummy
13+
MVN_PWD: ${{ secrets.GITHUB_TOKEN }}
14+
1115

1216
jobs:
1317

@@ -40,9 +44,6 @@ jobs:
4044
key: ${{ runner.os }}-cache-java-${{ matrix.java }}-${{ github.sha }}
4145
- name: Build with Maven
4246
run: mvn -B clean install -s settings.xml
43-
env:
44-
MVN_USR: dummy
45-
MVN_PWD: ${{ secrets.GITHUB_TOKEN }}
4647

4748
code-analysis:
4849
permissions:
@@ -65,14 +66,8 @@ jobs:
6566
path: "**/target/"
6667
fail-on-cache-miss: true
6768
key: ${{ runner.os }}-cache-java-21-${{ github.sha }}
68-
# the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
69-
# Triggering SonarQube analysis as results of it are required by Quality Gate check.
7069
- name: SonarQube Scan
71-
uses: SonarSource/sonarqube-scan-action@v6
72-
with:
73-
args: >
74-
-Dsonar.qualitygate.wait=true
75-
-Dsonar.qualitygate.timeout=600
70+
run: mvn -s settings.xml -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.qualitygate.wait=true -Dsonar.qualitygate.timeout=600
7671
env:
7772
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7873

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<sonar.pluginOrganizationName>CNES</sonar.pluginOrganizationName>
7272
<sonar.sources>src/main/java</sonar.sources>
7373
<sonar.test>src/test/java</sonar.test>
74+
<sonar.organization>lequal</sonar.organization>
7475
</properties>
7576

7677
<dependencies>

sonar-project.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)