ci: add SonarQube scan job
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
7f2f174044
commit
c506ea5735
1 file changed
+17
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user