1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-31 22:05:13 +02:00

Update sonarqube.yml

This commit is contained in:
Anton Titovets 2024-02-22 16:32:58 +03:00 committed by GitHub
parent 6a9a8737fb
commit 3cce6df509

View File

@ -36,32 +36,35 @@ on:
permissions: permissions:
pull-requests: read # allows SonarQube to decorate PRs with analysis results pull-requests: read # allows SonarQube to decorate PRs with analysis results
jobs: jobs:
Analysis: sonar-scanner:
if: github.repository == 'bayselonarrend/OpenIntegrations'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Analyze with SonarQube - name: Checkout
uses: actions/checkout@v1
# You can pin the exact commit or the version. with:
# uses: SonarSource/sonarqube-scan-action@v1.1.0 fetch-depth: 0
uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8 - name: Setup sonarqube
env: uses: warchant/setup-sonar-scanner@v3
GITHUB_TOKEN: ${{ secrets.TOKEN }} # Needed to get PR information - name: Run SonarQube on push
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) if: github.event_name == 'push'
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret) env:
with: GITHUB_TOKEN: ${{ secrets.TOKEN }}
# Additional arguments for the sonarcloud scanner SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
args: run: sonar-scanner
# Unique key of your project. You can find it in SonarQube > [my project] > Project Information (top-right menu) -Dsonar.login=${{ secrets.SONAR_TOKEN }}
# mandatory -Dsonar.host.url=https://api.athenaeum.digital/Sonar
-Dsonar.projectKey=OpenIntegrations - name: Run SonarQube on pull request
-Dsonar.inclusions=**/*.bsl if: github.event_name == 'pull_request'
# Comma-separated paths to directories containing main source files. env:
#-Dsonar.sources= # optional, default is project base directory GITHUB_TOKEN: ${{ secrets.TOKEN }}
# When you need the analysis to take place in a directory other than the one from which it was launched SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#-Dsonar.projectBaseDir= # optional, default is . run: sonar-scanner
# Comma-separated paths to directories containing test source files. -Dsonar.login=${{ secrets.SONAR_TOKEN }}
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/ -Dsonar.host.url=https://api.athenaeum.digital/Sonar
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing. -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
#-Dsonar.verbose= # optional, default is false -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}