]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "DO NOT MERGE"
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 17 Aug 2017 12:30:38 +0000 (14:30 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 17 Aug 2017 12:31:13 +0000 (14:31 +0200)
This reverts commit fae038c5e6c24dc805eb635b6efcd5bdca7ba615.
... because return from holidays is hard

.cix.yml
travis.sh

index cdeff5f1f97572084c1a09baad01587ee64daec1..992f1604978e86df097ca5825b47e59b9546d19f 100644 (file)
--- a/.cix.yml
+++ b/.cix.yml
@@ -2,11 +2,42 @@
 # Based on https://wiki.jenkins-ci.org/display/JENKINS/Yaml+Axis+Plugin
 
 RUN_ACTIVITY:
-
+  - run-db-unit-tests-mysql56
+  - run-db-unit-tests-mssql2012
+  - run-db-unit-tests-mssql2014
+  - run-db-unit-tests-oracle11g
+  - run-db-unit-tests-oracle12c
+  - run-db-unit-tests-postgresql93
+  - run-db-integration-tests-mysql56-Category1
   - run-db-integration-tests-mysql56-Category2
+  - run-db-integration-tests-mysql56-Category3
+  - run-db-integration-tests-mysql56-Category4
+  - run-db-integration-tests-mysql56-Category5
+  - run-db-integration-tests-mysql56-Category6
+  - run-db-integration-tests-mssql2014-Category1
   - run-db-integration-tests-mssql2014-Category2
+  - run-db-integration-tests-mssql2014-Category3
+  - run-db-integration-tests-mssql2014-Category4
+  - run-db-integration-tests-mssql2014-Category5
+  - run-db-integration-tests-mssql2014-Category6
+  - run-db-integration-tests-oracle12c-Category1
   - run-db-integration-tests-oracle12c-Category2
+  - run-db-integration-tests-oracle12c-Category3
+  - run-db-integration-tests-oracle12c-Category4
+  - run-db-integration-tests-oracle12c-Category5
+  - run-db-integration-tests-oracle12c-Category6
+  - run-db-integration-tests-postgresql93-Category1
   - run-db-integration-tests-postgresql93-Category2
+  - run-db-integration-tests-postgresql93-Category3
+  - run-db-integration-tests-postgresql93-Category4
+  - run-db-integration-tests-postgresql93-Category5
+  - run-db-integration-tests-postgresql93-Category6
+  - run-upgrade-tests-mysql56
+  - run-upgrade-tests-mssql2014
+  - run-upgrade-tests-oracle12c
+  - run-upgrade-tests-postgresql93
+  - run-it-released-plugins
+  - run-perf-tests
 
 exclude:
   - RUN_ACTIVITY: run-db-unit-tests-mysql56
index b62a05ecfa840465612c27149bba45bf7be377b9..c1fb2fbf84bdd1a06f17df8477de9723f5837726 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -128,10 +128,59 @@ 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"
 
-  mvn deploy \
+  if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
+    echo 'Build and analyze master'
+
+    # 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
+
+    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
           $MAVEN_ARGS \
-          -Pdeploy-sonarsource -DskipTests
+          -Pdeploy-sonarsource,release
+    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'
+
+    mvn deploy $MAVEN_ARGS -Pdeploy-sonarsource,release
+
+  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 \
+        $MAVEN_ARGS \
+        -Dsource.skip=true \
+        -Pdeploy-sonarsource
+    mvn sonar:sonar \
+        -Dsonar.analysis.mode=preview \
+        -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
+        -Dsonar.github.repository=$TRAVIS_REPO_SLUG \
+        -Dsonar.github.oauth=$GITHUB_TOKEN \
+        -Dsonar.host.url=$SONAR_HOST_URL \
+        -Dsonar.login=$SONAR_TOKEN
+
+  else
+    echo 'Build feature branch or external pull request'
+
+    mvn install $MAVEN_ARGS -Dsource.skip=true
+  fi
 
+  ./run-integration-tests.sh "Lite" ""
   ;;
 
 WEB_TESTS)