diff options
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/travis.sh b/travis.sh index c1fb2fbf84b..b62a05ecfa8 100755 --- a/travis.sh +++ b/travis.sh @@ -128,59 +128,10 @@ 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" - 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 \ + mvn deploy \ $MAVEN_ARGS \ - -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 + -Pdeploy-sonarsource -DskipTests - ./run-integration-tests.sh "Lite" "" ;; WEB_TESTS) |