Skip to content

Commit 7337a82

Browse files
committed
Configures SonarQube
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
1 parent dfff5d9 commit 7337a82

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/sonarqube.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: SonarQube scan
2+
3+
on:
4+
# Trigger analysis when pushing to your main branches, and when creating a pull request.
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
sonarqube:
13+
name: SonarQube scan
14+
runs-on: ip-range-controlled
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
19+
- uses: sonarsource/sonarqube-scan-action@master
20+
env:
21+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
22+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

sonar-project.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sonar.projectKey=inspec_magic-modules_AYzVMaVMhXuvzhhRmNV6
2+
sonar.projectName=Chef-Inspec-magic-modules
3+
4+
sonar.sources=.

0 commit comments

Comments
 (0)