From e69b87a6e0431d8685219e02eda9052aca870813 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Tue, 26 Nov 2024 14:33:09 -0600 Subject: [PATCH] Add baseline sonarqube issue count Signed-off-by: Andre Kurait --- .github/workflows/sonar-qube.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonar-qube.yml b/.github/workflows/sonar-qube.yml index d80422a7a..45b74729f 100644 --- a/.github/workflows/sonar-qube.yml +++ b/.github/workflows/sonar-qube.yml @@ -77,11 +77,12 @@ jobs: done ISSUE_COUNT=$(jq '.issues | length' issues.json) - if [ "$ISSUE_COUNT" -gt 0 ]; then - echo "❌ Build failed: Found $ISSUE_COUNT issues." + BASELINE_ISSUE_COUNT=89 # Baseline issue count + if [ "$ISSUE_COUNT" -gt "$BASELINE_ISSUE_COUNT" ]; then + echo "❌ Build failed: Found $ISSUE_COUNT issues, which is more than the baseline of $BASELINE_ISSUE_COUNT." exit 1 else - echo "✅ No issues found." + echo "✅ Build passed: Found $ISSUE_COUNT issues, which is within the baseline of $BASELINE_ISSUE_COUNT." fi - name: Upload SonarQube Artifacts if: always()