Generate Sonar data and attempt to upload
Change-Id: I3cf2ad060cba8b05f33dc8537625a9495a7561d1
diff --git a/jjb/onos/onos-sonar.sh b/jjb/onos/onos-sonar.sh
index c59469c..eb420a1 100644
--- a/jjb/onos/onos-sonar.sh
+++ b/jjb/onos/onos-sonar.sh
@@ -2,12 +2,18 @@
ONOS_ROOT=`pwd`
. tools/build/envDefaults
+# download and install Sonar scanner
SONAR_SCANNER_VERSION=3.0.3.778
-
curl -L -o /tmp/sonar-scanner-cli.zip -X GET https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION.zip
unzip /tmp/sonar-scanner-cli.zip
+
+# Configure ONOS specific properties
echo "sonar.host.url=http://sonar.onosproject.org" >>sonar-scanner-$SONAR_SCANNER_VERSION/conf/sonar-scanner.properties
+# Generate coverage data
+tools/build/onos-prepare-sonar
+
+# Upload coverage to Sonar
sonar-scanner-$SONAR_SCANNER_VERSION/bin/sonar-scanner