Sonar Fix

This commit is contained in:
Sofiene BEN KHEMIS
2021-05-10 14:18:05 +02:00
parent 896d190e8d
commit 3a2061e802
2 changed files with 9 additions and 20 deletions

View File

@@ -1,24 +1,19 @@
name: SonarCloud
on: on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push: push:
branches: branches:
- beanstalk-java8 - beanstalk-java8
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs: jobs:
sonarcloud: build:
runs-on: ubuntu-latest runs-on: ubuntu-16.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
with: with:
# Disabling shallow clone is recommended for improving relevancy of reporting java-version: '8'
fetch-depth: 0 - name: Analyze with SonarCloud
- name: Remove pom run: ./mvnw -B verify sonar:sonar -Dsonar.projectKey=sofieneBK_hands-on-hexagonal-architecture-with-spring-boot -Dsonar.organization=sofienebk -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
run: rm -f pom.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -1,6 +0,0 @@
sonar.organization=sofienebk
sonar.projectKey=sofieneBK_hands-on-hexagonal-architecture-with-spring-boot
# relative paths to source directories. More details and properties are described
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
sonar.sources=.