]> source.dussan.org Git - sonarqube.git/commitdiff
Disable analysis of LTS branch
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 22 Mar 2018 10:20:12 +0000 (11:20 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 22 Mar 2018 16:13:15 +0000 (17:13 +0100)
travis.sh

index b6f748544393c93cb043ef93ab3ae2bbff1439a8..b8a8c969362ffab87107d759f72adfa81251004d 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -129,75 +129,27 @@ BUILD)
   export MAVEN_OPTS="-Xmx1G -Xms128m"
   MAVEN_ARGS="-T 1C -Dmaven.test.redirectTestOutputToFile=false -Dsurefire.useFile=false -B -e -V -DbuildVersion=$BUILD_VERSION -Dtests.es.logger.level=WARN -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
 
-
-  # Fetch all commit history so that SonarQube has exact blame information
-  # for issue auto-assignment
-  # This command can fail with "fatal: --unshallow on a complete repository does not make sense"
-  # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50).
-  # For this reason errors are ignored with "|| true"
-  git fetch --unshallow || true
-
-
   if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
     echo 'Build and analyze master'
-    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
+    mvn deploy \
           $MAVEN_ARGS \
           -Pdeploy-sonarsource,release
-        
-    mvn sonar:sonar \
-          -Dsonar.host.url=$SONAR_HOST_URL \
-          -Dsonar.login=$SONAR_TOKEN \
-          -Dsonar.projectVersion=$INITIAL_VERSION \
-          -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
-          -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
-          -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
-          -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
 
   elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
     echo 'Build release branch'
 
-    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
+    mvn deploy \
         $MAVEN_ARGS \
         -Pdeploy-sonarsource,release
 
-    mvn sonar:sonar \
-        -Dsonar.host.url=$SONAR_HOST_URL \
-        -Dsonar.login=$SONAR_TOKEN \
-        -Dsonar.branch.name=$TRAVIS_BRANCH \
-        -Dsonar.projectVersion=$INITIAL_VERSION \
-        -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
-        -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
-        -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
-        -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
-
   elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
     echo 'Build and analyze internal pull request'
 
-    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
+    mvn deploy \
         $MAVEN_ARGS \
         -Dsource.skip=true \
         -Pdeploy-sonarsource
 
-    # analysis to decorate GitHub pull request
-    # (need support of standard analysis mode in GH plugin)
-    mvn sonar:sonar \
-        -Dsonar.host.url=$SONAR_HOST_URL \
-        -Dsonar.login=$SONAR_TOKEN \
-        -Dsonar.analysis.mode=preview \
-        -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
-        -Dsonar.github.repository=$TRAVIS_REPO_SLUG \
-        -Dsonar.github.oauth=$GITHUB_TOKEN
-
-    mvn sonar:sonar \
-        -Dsonar.host.url=$SONAR_HOST_URL \
-        -Dsonar.login=$SONAR_TOKEN \
-        -Dsonar.branch.name=$TRAVIS_PULL_REQUEST_BRANCH \
-        -Dsonar.branch.target=$TRAVIS_BRANCH \
-        -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
-        -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
-        -Dsonar.analysis.sha1=$TRAVIS_PULL_REQUEST_SHA \
-        -Dsonar.analysis.prNumber=$TRAVIS_PULL_REQUEST \
-        -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
   else
     echo 'Build feature branch or external pull request'