ci(sonarqube): non-blocking SonarQube analysis on push to main #83

Merged
whitlocktech merged 1 commits from ci/sonarqube-analysis into main 2026-07-21 02:54:16 +00:00
Member

What

Integrates the self-hosted SonarQube server (http://192.168.0.56:9000) with this repo via a Gitea Actions workflow. Analysis runs on push to main (post-merge) and on manual workflow_dispatch — it never gates a PR, so it's non-blocking by design. Complements pr-checks.yml (gates PRs) and build-images.yml (ships images); this one only feeds the SonarQube dashboard.

Files

  • .gitea/workflows/sonarqube.yml — runs sonarsource/sonarqube-scan-action@v4 on the existing self-hosted ubuntu-latest runner. Full-history checkout (fetch-depth: 0) for accurate new-code/blame attribution. Does not wait on the Quality Gate, so a failing gate never fails the job.
  • sonar-project.properties — project key runic-gateway-website (matches the project already created in SonarQube). Sources = server/src, client/src, bot/src; tests = server/test; excludes node_modules, client/dist, generated Swagger, logs, uploads.

Required one-time setup (Gitea UI → Repo → Settings → Actions)

  1. Secret SONAR_TOKEN — a SonarQube analysis token (SonarQube → My Account → Security).
  2. Variable SONAR_HOST_URLhttp://192.168.0.56:9000 (kept as a variable so the internal address isn't committed).

The runner must be able to reach SONAR_HOST_URL on the LAN.

Notes

  • No behavior/protocol/endpoint/schema change; workflow is self-documented in its header comment, so no docs/ change is required.

AI-assisted: authored with Claude Code.

🤖 Generated with Claude Code

## What Integrates the self-hosted SonarQube server (`http://192.168.0.56:9000`) with this repo via a Gitea Actions workflow. Analysis runs on **push to `main`** (post-merge) and on manual `workflow_dispatch` — it **never gates a PR**, so it's non-blocking by design. Complements `pr-checks.yml` (gates PRs) and `build-images.yml` (ships images); this one only feeds the SonarQube dashboard. ## Files - **`.gitea/workflows/sonarqube.yml`** — runs `sonarsource/sonarqube-scan-action@v4` on the existing self-hosted `ubuntu-latest` runner. Full-history checkout (`fetch-depth: 0`) for accurate new-code/blame attribution. Does **not** wait on the Quality Gate, so a failing gate never fails the job. - **`sonar-project.properties`** — project key `runic-gateway-website` (matches the project already created in SonarQube). Sources = `server/src`, `client/src`, `bot/src`; tests = `server/test`; excludes `node_modules`, `client/dist`, generated Swagger, logs, uploads. ## Required one-time setup (Gitea UI → Repo → Settings → Actions) 1. **Secret** `SONAR_TOKEN` — a SonarQube analysis token (SonarQube → My Account → Security). 2. **Variable** `SONAR_HOST_URL` — `http://192.168.0.56:9000` (kept as a variable so the internal address isn't committed). The runner must be able to reach `SONAR_HOST_URL` on the LAN. ## Notes - No behavior/protocol/endpoint/schema change; workflow is self-documented in its header comment, so no `docs/` change is required. --- AI-assisted: authored with Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wtclaude added 1 commit 2026-07-21 02:43:27 +00:00
ci(sonarqube): add non-blocking SonarQube analysis on push to main
All checks were successful
PR Checks / bot-install (pull_request) Successful in 1m16s
PR Checks / server-tests (pull_request) Successful in 9m41s
PR Checks / client-build (pull_request) Successful in 10m39s
c54bb54834
Wire the self-hosted SonarQube server into Gitea via a Gitea Actions
workflow. Runs on push to `main` (post-merge) and workflow_dispatch, so
it feeds the dashboard without gating any PR. Adds sonar-project.properties
(project key runic-gateway-website; server/client/bot sources, server tests,
node_modules/dist/generated excluded).

Requires two one-time Gitea settings: secret SONAR_TOKEN and variable
SONAR_HOST_URL. The scan does not wait on the Quality Gate, keeping it
fully non-blocking.

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech approved these changes 2026-07-21 02:45:16 +00:00
whitlocktech scheduled this pull request to auto merge when all checks succeed 2026-07-21 02:45:22 +00:00
whitlocktech merged commit 82bf2c972c into main 2026-07-21 02:54:16 +00:00
whitlocktech deleted branch ci/sonarqube-analysis 2026-07-21 02:54:16 +00:00
Sign in to join this conversation.
No description provided.