From 0b4347c2d0afda71493322af3e699dacadfd44d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolgrand=20Ara=C3=BAjo=20Pinheiro?= Date: Sun, 29 Nov 2026 22:55:19 -0300 Subject: [PATCH 1/2] feat: implementa caller sonar --- .github/workflows/sonar.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/sonar.yml diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 000000000..232575c9a --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,40 @@ +name: SonarQube Analysis + +on: + push: + branches: + - dev + - main + pull_request: + branches: + - dev + - main + +permissions: + contents: read + +jobs: + sonar-backend: + name: Backend Analysis (Maven) + uses: IFPBEsp/APAE-INFRA/.github/workflows/reusable-sonarqube-maven.yml@dev + with: + project-key: "apae-geral-backend" + working-directory: "apps/api" + java-version: "21" + sonar-host-url: ${{ vars.SONAR_HOST_URL || 'https://sonarcloud.io' }} + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + sonar-frontend: + name: Frontend Analysis (Node) + uses: IFPBEsp/APAE-INFRA/.github/workflows/reusable-sonarqube-node.yml@dev + with: + project-key: "apae-geral-frontend" + working-directory: "apps/apae" + node-version: "22" + sonar-host-url: ${{ vars.SONAR_HOST_URL || 'https://sonarcloud.io' }} + run-tests: true + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} From b7f6f46db8c41b46583471cbcd06e29630d3f94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolgrand=20Ara=C3=BAjo=20Pinheiro?= Date: Sun, 29 Nov 2026 22:59:48 -0300 Subject: [PATCH 2/2] chore: utiliza sha para referenciar branch --- .github/workflows/sonar.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 232575c9a..7ab915a03 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -16,7 +16,7 @@ permissions: jobs: sonar-backend: name: Backend Analysis (Maven) - uses: IFPBEsp/APAE-INFRA/.github/workflows/reusable-sonarqube-maven.yml@dev + uses: IFPBEsp/APAE-INFRA/.github/workflows/reusable-sonarqube-maven.yml@0f8d838637b0cd2f77a2c9361b3e7b577a4880bf with: project-key: "apae-geral-backend" working-directory: "apps/api" @@ -28,7 +28,7 @@ jobs: sonar-frontend: name: Frontend Analysis (Node) - uses: IFPBEsp/APAE-INFRA/.github/workflows/reusable-sonarqube-node.yml@dev + uses: IFPBEsp/APAE-INFRA/.github/workflows/reusable-sonarqube-node.yml@0f8d838637b0cd2f77a2c9361b3e7b577a4880bf with: project-key: "apae-geral-frontend" working-directory: "apps/apae"