Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for sonarqube onboarding #8889

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SonarQube scan

on:
# Trigger analysis when pushing to your main branches, and when creating a pull request.
push:
branches:
- main
- develop
- 'release/**'
pull_request:
types: [opened, synchronize, reopened]

jobs:
sonarqube:
runs-on: ip-range-controlled
steps:
- uses: actions/checkout@v3
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 }}
8 changes: 8 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sonar.projectKey=habitat-sh_habitat_AYi0h-B8ub6NcyE4pK8b

# project name defaults to project key
sonar.projectName=Chef-Habitat-habitat

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=
sonar.exclusions=