ci: add SonarQube scan job
build-scan-deploy / sonarqube (push) Successful in 49s
build-scan-deploy / build (push) Successful in 2m36s

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
josephandClaude Opus 5.5 committed 2026-11-21 20:42:21 +03:00
1 parent 7f2f174044
commit c506ea5735
1 file changed
+17
+17
View File
@@ -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: