From 856202957acce4ddc970381b100bd879d6fede8e Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Tue, 21 Oct 2025 19:09:50 +0500 Subject: [PATCH 1/3] Sonarqube workflow --- sonar-project.properties | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..dcee46a --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectKey=AltaPay_plugin-shopware_6ff55bfb-f13e-4cba-a54c-9f0804511bbf +sonar.coverage.exclusions=** From 880631e5fa1cf693fb9c7ce8ebf5b9bcf0d538a4 Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Tue, 21 Oct 2025 19:20:43 +0500 Subject: [PATCH 2/3] Add SonarQube analysis workflow --- .github/workflows/sonarqube-analysis.yml | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/sonarqube-analysis.yml diff --git a/.github/workflows/sonarqube-analysis.yml b/.github/workflows/sonarqube-analysis.yml new file mode 100644 index 0000000..324ba29 --- /dev/null +++ b/.github/workflows/sonarqube-analysis.yml @@ -0,0 +1,31 @@ +name: SonarQube Analysis + +on: + pull_request: + push: + branches: ["**"] + +jobs: + build: + name: Run SonarQube Analysis + runs-on: self-hosted + + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: SonarQube Quality Gate check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@v1.2.0 + with: + pollingTimeoutSec: 600 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} From 7b8c00870dc2dc10f5d2fac0270c9756f7dc0976 Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Tue, 21 Oct 2025 19:21:07 +0500 Subject: [PATCH 3/3] Add project base directory to sonar properties --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index dcee46a..b8391a1 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,2 +1,3 @@ sonar.projectKey=AltaPay_plugin-shopware_6ff55bfb-f13e-4cba-a54c-9f0804511bbf +sonar.projectBaseDir=src sonar.coverage.exclusions=**