diff --git a/.github/workflows/ci-sfera-mock.yml b/.github/workflows/ci-sfera-mock.yml index a2aabfdc..dc7f25ba 100644 --- a/.github/workflows/ci-sfera-mock.yml +++ b/.github/workflows/ci-sfera-mock.yml @@ -37,28 +37,6 @@ jobs: cache: maven - name: Run the Maven verify phase run: mvn --batch-mode --update-snapshots verify - - name: SonarCloud scan for PR - uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3 - if: github.event_name == 'pull_request' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: sfera-mock - args: | - -Dsonar.pullrequest.base=${{ github.base_ref }} - -Dsonar.pullrequest.branch=${{ github.head_ref }} - -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} - - name: SonarCloud scan for Push - uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3 - if: github.event_name == 'push' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: sfera-mock - args: | - -Dsonar.branch.name=${{ github.head_ref }} - name: Login to GitHub Container Registry if: github.ref == 'refs/heads/main' run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin diff --git a/backend/pom.xml b/backend/pom.xml index 63da78f8..8fa55343 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -111,6 +111,34 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.12 + + **/*.jar + + + + prepare-agent + + prepare-agent + + + + report + package + + report + + + + XML + + + + + diff --git a/backend/sonar-project.properties b/backend/sonar-project.properties index eb5313e1..104a34d2 100644 --- a/backend/sonar-project.properties +++ b/backend/sonar-project.properties @@ -5,7 +5,7 @@ sonar.host.url=https://sonarcloud.io # --- optional properties --- # defaults to project key -sonar.projectName=Backend +sonar.projectName=DAS/backend # defaults to 'not provided' #sonar.projectVersion=1.0 diff --git a/sfera-mock/sonar-project.properties b/sfera-mock/sonar-project.properties deleted file mode 100644 index 41514e19..00000000 --- a/sfera-mock/sonar-project.properties +++ /dev/null @@ -1,16 +0,0 @@ -sonar.projectKey=SchweizerischeBundesbahnen_DAS -sonar.organization=schweizerischebundesbahnen -sonar.host.url=https://sonarcloud.io - -# --- optional properties --- - -# defaults to project key -sonar.projectName=SFERA mock -# defaults to 'not provided' -#sonar.projectVersion=1.0 - -# Path is relative to the sonar-project.properties file. Defaults to . -#sonar.sources=. - -# Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8