-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add SonarCloud implementation (#42)
* add devsecops_pipeline.py * add devsecops-pipeline workflow * replace sonarqube with bandit * edit cron job * add comment for the cron job * add Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit Git Guardian workflow * edit README file * edit DevSecOps pipeline * edit release badge * add .gitignore file * add PR Title Linter * add status badge for PR Linter * add SonarCloud implementation * edit sonar-project.properties * add SonarCloud badge
- Loading branch information
1 parent
94c8157
commit 305cb4a
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: SonarCloud Analysis | ||
|
||
on: | ||
# Trigger analysis when pushing to your main branches, and when creating a pull request. | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
sonar-scan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
java-package: 'jdk' | ||
|
||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@v3 # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/sonarcloud-scan | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Required project settings | ||
sonar.organization=meleksabit | ||
sonar.projectKey=meleksabit_My-Python-Examples | ||
sonar.projectName=My-Python-Examples | ||
sonar.host.url=https://sonarcloud.io | ||
|
||
# Optional configuration | ||
sonar.sources=. | ||
sonar.language=python # (or your project's primary language) | ||
sonar.sourceEncoding=UTF-8 |