Skip to content

Commit

Permalink
utils: run-sonar utility
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaceccanti committed Mar 19, 2019
1 parent ba92499 commit bd34b00
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions utils/run-sonar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ -z ${SONAR_HOST_URL} ]; then
echo "Please define the SONAR_HOST_URL env variable pointing to a valid sonarqube server"
exit 1
fi

if [ -z ${SONAR_AUTH_TOKEN} ]; then
echo "Please define the SONAR_AUTH_TOKEN env variable"
exit 1
fi

mvn -B -U clean cobertura:cobertura \
-Dcobertura.report.format=xml \
checkstyle:check -Dcheckstyle.config.location=google_checks.xml \
compile sonar:sonar \
-Dsonar.host.url=${SONAR_HOST_URL} \
-Dsonar.login=${SONAR_AUTH_TOKEN}

0 comments on commit bd34b00

Please sign in to comment.