-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: chg: POS-215 move sonarqube to own ci (#153)
- Loading branch information
1 parent
0aea961
commit 1c6fd20
Showing
2 changed files
with
32 additions
and
26 deletions.
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
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,32 @@ | ||
name: SonarQube CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
sonarqube: | ||
name: SonarQube | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Disabling shallow clone is recommended for improving relevancy of reporting. | ||
fetch-depth: 0 | ||
|
||
# Triggering SonarQube analysis as results of it are required by Quality Gate check. | ||
- name: SonarQube Scan | ||
uses: sonarsource/sonarqube-scan-action@master | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
|
||
# Check the Quality Gate status. | ||
- name: SonarQube Quality Gate check | ||
id: sonarqube-quality-gate-check | ||
uses: sonarsource/sonarqube-quality-gate-action@master | ||
# Force to fail step after specific time. | ||
timeout-minutes: 5 | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |