]> source.dussan.org Git - sonarqube.git/commitdiff
BUILD-495 add incremental analysis and full analysis every 0 ending build
authorTom <thomas.verin@sonarsource.com>
Fri, 11 Aug 2017 08:17:42 +0000 (10:17 +0200)
committertomverin <thomas.verin@sonarsource.com>
Fri, 11 Aug 2017 13:55:50 +0000 (15:55 +0200)
travis.sh

index 70f6b1e2cec9c3d1ff7ea45ff5b6fe79623033e1..b0e49824b3563989989ce73a0f13d5624456d9ca 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -134,11 +134,18 @@ BUILD)
     mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
           $MAVEN_ARGS \
           -Pdeploy-sonarsource,release
-    mvn sonar:sonar \
+    if [[ "$TRAVIS_BUILD_NUMBER" == *0 ]]; then
+      mvn sonar:sonar \
           -Dsonar.host.url=$SONAR_HOST_URL \
           -Dsonar.login=$SONAR_TOKEN \
           -Dsonar.projectVersion=$INITIAL_VERSION
-
+    else
+      mvn sonar:sonar \
+          -Dsonar.incremental=true \
+          -Dsonar.host.url=$SONAR_HOST_URL \
+          -Dsonar.login=$SONAR_TOKEN \
+          -Dsonar.projectVersion=$INITIAL_VERSION
+    fi
 
   elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
     echo 'Build release branch'