From 9139e048e21e2defbe0b35fec38c622e8a741c94 Mon Sep 17 00:00:00 2001 From: Tom Gianos Date: Thu, 24 Jan 2019 11:19:18 -0800 Subject: [PATCH] Add stacktrace as default argument for gradle on Travis builds --- travis/buildViaTravis.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/travis/buildViaTravis.sh b/travis/buildViaTravis.sh index ca20da0ff4a..28a3240d907 100755 --- a/travis/buildViaTravis.sh +++ b/travis/buildViaTravis.sh @@ -4,30 +4,33 @@ # Stop at the first error set -e +GRADLE=./gradlew +GRADLE_OPTIONS='--no-daemon --stacktrace' + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" # Build and run all tests, create coverage report - ./gradlew --no-daemon build codeCoverageReport coveralls + ${GRADLE} ${GRADLE_OPTIONS} build codeCoverageReport coveralls # Re-run genie-web integration tests with MySQL... - INTEGRATION_TEST_DB=mysql ./gradlew --no-daemon genie-web:integrationTests + INTEGRATION_TEST_DB=mysql ${GRADLE} ${GRADLE_OPTIONS} genie-web:integrationTests # ... and PostgreSQL - INTEGRATION_TEST_DB=postgresql ./gradlew --no-daemon genie-web:integrationTests + INTEGRATION_TEST_DB=postgresql ${GRADLE} ${GRADLE_OPTIONS} genie-web:integrationTests # Build Docker images and compile documentation - ./gradlew --no-daemon javadoc asciidoc dockerBuildAllImages + ${GRADLE} ${GRADLE_OPTIONS} javadoc asciidoc dockerBuildAllImages elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew --no-daemon -Prelease.travisBranch=$TRAVIS_BRANCH -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" snapshot codeCoverageReport coveralls gitPublishPush dockerPush + ${GRADLE} ${GRADLE_OPTIONS} -Prelease.travisBranch=$TRAVIS_BRANCH -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" snapshot codeCoverageReport coveralls gitPublishPush dockerPush elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' case "$TRAVIS_TAG" in *-rc\.*) - ./gradlew --no-daemon -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate codeCoverageReport coveralls gitPublishPush dockerPush + ${GRADLE} ${GRADLE_OPTIONS} -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate codeCoverageReport coveralls gitPublishPush dockerPush ;; *) - ./gradlew --no-daemon -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final codeCoverageReport coveralls gitPublishPush dockerPush + ${GRADLE} ${GRADLE_OPTIONS} -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final codeCoverageReport coveralls gitPublishPush dockerPush ;; esac else echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew --no-daemon build codeCoverageReport coveralls + ${GRADLE} ${GRADLE_OPTIONS} build codeCoverageReport coveralls fi