From 752a2d1ba32c209a57354ef753e86c60a511ae20 Mon Sep 17 00:00:00 2001 From: Renaud Subiger Date: Thu, 14 Nov 2024 19:01:55 +0100 Subject: [PATCH 1/3] Add SonarQube configuration and GitHub workflow --- .github/workflows/sonarqube.yml | 23 +++++++++++++++++++++++ sonar-project.properties | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 0000000..4807373 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,23 @@ +name: SonarQube Scan + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + sonarqube-scan: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: SonarQube Scan + uses: SonarSource/sonarcloud-github-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..c5a6070 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +# @formatter:off + +sonar.projectKey=konateq_ehrbase-helm-chart +sonar.organization=konateq + +sonar.projectName=EHRbase Helm Chart From 23caee4f77af4509b2437f0db458807c699337b2 Mon Sep 17 00:00:00 2001 From: Renaud Subiger Date: Thu, 14 Nov 2024 19:25:26 +0100 Subject: [PATCH 2/3] Add sonar source and encoding properties --- sonar-project.properties | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index c5a6070..c831852 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,5 @@ -# @formatter:off - -sonar.projectKey=konateq_ehrbase-helm-chart sonar.organization=konateq - +sonar.projectKey=konateq_ehrbase-helm-chart sonar.projectName=EHRbase Helm Chart +sonar.sources=. +sonar.sourceEncoding=UTF-8 \ No newline at end of file From 809c572095b0c7ec061d3451d028651b25d7bc43 Mon Sep 17 00:00:00 2001 From: Renaud Subiger Date: Thu, 14 Nov 2024 20:20:45 +0100 Subject: [PATCH 3/3] Remove redundant SonarQube properties --- sonar-project.properties | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index c831852..88d76db 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,3 @@ -sonar.organization=konateq sonar.projectKey=konateq_ehrbase-helm-chart -sonar.projectName=EHRbase Helm Chart -sonar.sources=. -sonar.sourceEncoding=UTF-8 \ No newline at end of file +sonar.organization=konateq +sonar.projectName=EHRbase Helm Chart \ No newline at end of file