added sonar validation step
This commit is contained in:
parent
1ffe0c4425
commit
3954362292
@ -11,13 +11,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
#- name: SonarQube Scan
|
|
||||||
# uses: kitabisa/sonarqube-action@v1.2.0
|
|
||||||
# with:
|
|
||||||
# host: ${{ secrets.SONARQUBE_HOST }}
|
|
||||||
# login: ${{ secrets.SONARQUBE_TOKEN }}
|
|
||||||
- name: SonarQube Scan
|
- name: SonarQube Scan
|
||||||
uses: sonarsource/sonarqube-scan-action@master # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
|
uses: sonarsource/sonarqube-scan-action@master # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
||||||
|
|
||||||
|
# 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.SONARQUBE_TOKEN }}
|
||||||
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
||||||
|
|
||||||
|
# Optionally you can use the output from the Quality Gate in another step.
|
||||||
|
# The possible outputs of the `quality-gate-status` variable are `PASSED`, `WARN` or `FAILED`.
|
||||||
|
- name: "Example show SonarQube Quality Gate Status value"
|
||||||
|
run: echo "The Quality Gate status is ${{ steps.sonarqube-quality-gate-check.outputs.quality-gate-status }}"
|
||||||
Loading…
Reference in New Issue
Block a user