ci: avoid sonar branch analysis on community edition
All checks were successful
build-and-push / lint (push) Successful in 4s
build-and-push / sonar (push) Successful in 11s
build-and-push / docker (push) Successful in 1m10s

This commit is contained in:
nocci 2025-12-31 10:24:15 +00:00
parent 4c255a8258
commit 6216d8eac3

View file

@ -61,15 +61,22 @@ jobs:
echo "Sample files:"
find . -maxdepth 2 -type f | head -n 20
echo "Running local sonar-scanner..."
sonar-scanner \
set -- \
-Dsonar.host.url="$HOST_URL" \
-Dsonar.token="$SONAR_TOKEN" \
-Dsonar.projectKey="$PROJECT_KEY" \
-Dsonar.branch.name="$BRANCH_NAME" \
-Dsonar.sources=. \
-Dsonar.scm.disabled=true \
-Dsonar.projectBaseDir="$WORKDIR"
if [ "${SONAR_ENABLE_BRANCH:-}" = "true" ]; then
set -- "$@" -Dsonar.branch.name="$BRANCH_NAME"
else
echo "Branch analysis disabled (requires SonarQube Developer Edition)"
fi
sonar-scanner "$@"
docker:
needs: [lint, sonar]
runs-on: self-hosted