From e0bce0ed7ef1207b6a351d39ea0a8c6868e58dcd Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Fri, 5 Jan 2024 18:35:30 +0530 Subject: [PATCH] Configures SonarQube Signed-off-by: Vasu1105 --- .github/workflows/sonarqube.yml | 24 ++++++++++++++++++++++++ sonar-project.properties | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 000000000..0b3313bd2 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,24 @@ +name: SonarQube scan + +on: + # Trigger analysis when pushing to your main branches, and when creating a pull request. + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarqube: + name: SonarQube scan + runs-on: ip-range-controlled + steps: + - uses: actions/checkout@v4 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..e185f3656 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=inspec_magic-modules_AYzVMaVMhXuvzhhRmNV6 +sonar.projectName=Chef-Inspec-magic-modules + +sonar.sources=. \ No newline at end of file