From c506ea57354caf5e69a9ff52f51d8bb583466e43 Mon Sep 17 00:00:00 2001 From: Joseph Omondi Date: Sat, 21 Nov 2026 20:42:21 +0300 Subject: [PATCH] ci: add SonarQube scan job Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/ci.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 5d74f02..90e4dcc 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -8,6 +8,23 @@ env: REGISTRY: 192.168.0.43:3000 IMAGE: 192.168.0.43:3000/joseph/hello-devops jobs: + # Code-quality scan on SonarQube (ops VM 106, https://sonar.labjom.com). Informational only: it never blocks a deploy. + # Uses the user-level secret SONAR_TOKEN and variable SONAR_HOST_URL set in Gitea (joseph > Settings > Actions). + sonarqube: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v4 + with: {fetch-depth: 0} + - name: SonarQube scan + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} + run: > + npx --yes @sonar/scan + -Dsonar.projectKey=hello-devops -Dsonar.projectName=hello-devops + -Dsonar.exclusions="**/node_modules/**,**/bin/**,**/obj/**,**/dist/**,**/.angular/**" + build: runs-on: ubuntu-latest steps: