Skip to content

Commit

Permalink
SonarCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph-Meyer committed Oct 11, 2024
1 parent 07d5666 commit 3e8cbd6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/sonarquest-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,39 @@ jobs:
push: true
tags: ghcr.io/viadee/sonarquest-backend:nightly


sonar-analysis-backend:
name: SonarCloud Analysis
runs-on: ubuntu-latest

strategy:
matrix:
include:
- app: sonarquest-backend
working-directory: ./backend
jacoco-report-dir: jacoco-report
sonar-project-key: viadee_sonarQuest
sonar-organization: viadee
sonar-host-url: https://sonarcloud.io
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download JaCoCo Report
uses: actions/download-artifact@master
with:
name: jacoco-report
path: ${{ matrix.jacoco-report-dir }}
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=${{ matrix.sonar-project-key }} \
-Dsonar.organization=${{ matrix.sonar-organization }} \
-Dsonar.host.url=${{ matrix.sonar-host-url }} \
-Dsonar.sources=src/main/java,src/main/resources/templates \
-Dsonar.coverage.jacoco.xmlReportPaths=../${{ matrix.jacoco-report-dir }}/jacoco.xml

frontend:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions sonarQuest-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<url>http://www.viadee.de</url>
</organization>

<properties>
<sonar.organization>viadee</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<url>https://github.com/viadee/sonarQuest</url>

<parent>
Expand Down

0 comments on commit 3e8cbd6

Please sign in to comment.