Skip to content

Commit

Permalink
Fix branch analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
vnaskos-sonar committed Dec 17, 2024
1 parent 9dd834a commit 599e186
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .cirrus/sonarqube-cloud-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ if [ "$CIRRUS_BRANCH" == "master" ] && [ -z "$CIRRUS_PR" ]; then
echo '======= Analyze master branch'
dotnet sonarscanner begin "${SONAR_PARAMS[@]}"

elif [[ "$CIRRUS_BRANCH" == "branch-"* || "$CIRRUS_BRANCH" == "ci-images-verifier" || "$CIRRUS_BRANCH" == "feature/"* ]] && [ -z "$CIRRUS_PR" ]; then
echo '======= Analyze long lived branch'
dotnet sonarscanner begin "${SONAR_PARAMS[@]}" -d:sonar.branch.name="${CIRRUS_BRANCH}"

elif [ -n "$CIRRUS_PR" ]; then
echo '======= Analyze pull request'
dotnet sonarscanner begin "${SONAR_PARAMS[@]}" \
Expand All @@ -30,5 +26,6 @@ elif [ -n "$CIRRUS_PR" ]; then
-d:sonar.pullrequest.base="${CIRRUS_BASE_BRANCH}"

else
echo '======= No analysis'
echo '======= Analyze branch'
dotnet sonarscanner begin "${SONAR_PARAMS[@]}" -d:sonar.branch.name="${CIRRUS_BRANCH}"
fi

0 comments on commit 599e186

Please sign in to comment.