File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,10 +14,18 @@ jobs:
1414 - uses : actions/checkout@v2
1515 with :
1616 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
17- - uses : sonarsource/sonarqube-scan-action@master
17+ - id : sonarqube_scan
18+ uses : sonarsource/sonarqube-scan-action@master
19+ continue-on-error : true
1820 env :
1921 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
2022 SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
23+ - name : Warn when SonarQube scan fails
24+ if : ${{ steps.sonarqube_scan.outcome == 'failure' }}
25+ run : |
26+ echo "::warning::SonarQube scan failed. This can be caused by transient Sonar host connectivity issues.
27+ Check the SonarQube step logs at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
28+ and re-run the workflow if needed."
2129 # If you wish to fail your job when the Quality Gate is red, uncomment the
2230 # following lines. This would typically be used to fail a deployment.
2331 # - uses: sonarsource/sonarqube-quality-gate-action@master
You can’t perform that action at this time.
0 commit comments