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: