Skip to content

Commit

Permalink
ci(github): use sonarcloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
ialejandro committed Nov 11, 2024
1 parent 25c1796 commit 4c3b513
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 7 deletions.
67 changes: 61 additions & 6 deletions .github/workflows/quality-check-repository.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "[SonarQube] Quality Check"
name: "[SonarCloud] Quality Check"

on:
workflow_dispatch:
Expand All @@ -9,19 +9,74 @@ on:
- 'app/**'
- 'cleaner/**'
- 'repo-cloner/**'
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build and analyze
app-api:
name: app-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: app/api

app-ui:
name: app-ui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: app/ui

cleaner:
name: cleaner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: sonarsource/sonarqube-scan-action@v3
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_INT }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL_INT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: cleaner/

repo-cloner:
name: repo-cloner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: repo-cloner/
3 changes: 3 additions & 0 deletions app/api/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=kdl-server_app-api
sonar.organization=konstellation-io
sonar.projectName=kdl-server-app-api
3 changes: 3 additions & 0 deletions app/ui/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=kdl-server_app-ui
sonar.organization=konstellation-io
sonar.projectName=kdl-server-app-ui
3 changes: 3 additions & 0 deletions cleaner/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=kdl-server_cleaner
sonar.organization=konstellation-io
sonar.projectName=kdl-server-cleaner
3 changes: 3 additions & 0 deletions repo-cloner/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=kdl-server_repo-cloner
sonar.organization=konstellation-io
sonar.projectName=kdl-server-repo-cloner
1 change: 0 additions & 1 deletion sonar-project.properties

This file was deleted.

0 comments on commit 4c3b513

Please sign in to comment.