From 14a2f76fd75bf0d6af565c8c69e9e418b186b0e8 Mon Sep 17 00:00:00 2001 From: elandau Date: Fri, 16 Nov 2018 11:39:46 -0800 Subject: [PATCH 1/5] Add missing scripts needed to publish via travis --- .travis.yml | 9 +++++++-- buildViaTravis.sh | 23 +++++++++++++++++++++++ installViaTravis.sh | 16 ++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 buildViaTravis.sh create mode 100644 installViaTravis.sh diff --git a/.travis.yml b/.travis.yml index d4398c1f2..405f74bcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,13 @@ sudo: false jdk: - oraclejdk8 -script: - - ./gradlew --info check +install: "./installViaTravis.sh" + +script: "./buildViaTravis.sh" + +cache: + directories: + - "$HOME/.gradle" after_failure: - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi \ No newline at end of file diff --git a/buildViaTravis.sh b/buildViaTravis.sh new file mode 100644 index 000000000..1d1a9c857 --- /dev/null +++ b/buildViaTravis.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# This script will build the project. + +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" + ./gradlew build +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then + echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' + ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Prelease.scope=patch build snapshot +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 -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate + ;; + *) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final + ;; + esac +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew build -x test +fi \ No newline at end of file diff --git a/installViaTravis.sh b/installViaTravis.sh new file mode 100644 index 000000000..b51fe10e9 --- /dev/null +++ b/installViaTravis.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# This script will build the project. + +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" + ./gradlew assemble +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then + echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' + ./gradlew -Prelease.travisci=true assemble +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then + echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew assemble +fi \ No newline at end of file From ce37c0425bd46aa1835757f1e17b29045b5eab36 Mon Sep 17 00:00:00 2001 From: elandau Date: Fri, 16 Nov 2018 12:31:20 -0800 Subject: [PATCH 2/5] Ignore tests for all builds --- buildViaTravis.sh | 8 ++++---- installViaTravis.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 buildViaTravis.sh mode change 100644 => 100755 installViaTravis.sh diff --git a/buildViaTravis.sh b/buildViaTravis.sh old mode 100644 new mode 100755 index 1d1a9c857..b85e84e2d --- a/buildViaTravis.sh +++ b/buildViaTravis.sh @@ -3,18 +3,18 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew build + ./gradlew build -x test elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Prelease.scope=patch build snapshot + ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Prelease.scope=patch build snapshot -x test 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 -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate -x test ;; *) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final -x test ;; esac else diff --git a/installViaTravis.sh b/installViaTravis.sh old mode 100644 new mode 100755 index b51fe10e9..f07bc77af --- a/installViaTravis.sh +++ b/installViaTravis.sh @@ -3,14 +3,14 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew assemble + ./gradlew assemble -x test elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true assemble + ./gradlew -Prelease.travisci=true assemble -x test elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble -x test else echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew assemble + ./gradlew assemble -x test fi \ No newline at end of file From d307dc4c411dd2e975e53f0de13ff3acb48f0955 Mon Sep 17 00:00:00 2001 From: Martin Chalupa Date: Fri, 16 Nov 2018 12:29:10 -0800 Subject: [PATCH 3/5] Add travis encrypted secrets --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 405f74bcd..c165ec748 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,11 @@ cache: - "$HOME/.gradle" after_failure: - - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi \ No newline at end of file + - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi +env: + global: + - secure: PKFOXNElIioKzR25ekT5PN9FITsQnORw8GjaYdVZecdO1nIZ89vt9UmI1UnD4Jm1qsLm2o+Bv77KCU6L0bQiFernyl9400OGEVHRiXl4UuNIkWOruVgRM5BBQixbvLzqP9ul9qxNDXhB8oP/wXGMVeBEKxutb1/0AXnLlLspF9U= + - secure: XvRKpxC/Qh4k2LIAdFgaIEP0UW9OCoIDXt4o8494drLD/VVOZX9Ig8trFqHtfZrwBiI3zpe0XKJEPNHHAap+MyQ4SpXv13VFDGPhQCdgfcnJ4mj1Nf34J1nFRj/nZsgC99gn28qExY9tB+9IJ4MmidUvGgzN4Q7y21XbvRmmk34= + - secure: FEeb9KksyAPPzEqRZCWpSr2rPh1kJV/ltNYpyIhM1W+jCf3IVESluGGbZD2ufzv6toGNUzXF82i/bWkNOP4FFnGcYltZ/2OiVQHdZliP4k2xW4Kvl1bMAXkAHstoNoOQqgupnt3SRc/WYe1zfc3FsHW0ADwRpBDFkFdhro1rSRo= + - secure: dkJ2w6CIxwo5qIh3sw59PvXvs+ht/hsuaP3IM47rMDo0FcqC86ZhjoWesizmktK7aU5K8A786xP4VZIbGWcrC++Igq3feLwhreCGVNAgLSoE5o7uRTmD3Rd9Z2TEZgKnxPyHoSv2G6H73Kgm64r+6JTpgamB84vgymhnDVbmIes= + - secure: PFeXGAjK07eBNbOTFq9AjNsQGlIN+H01TAcX1NraFdoEEIM+qvdf6hVK81d0dmceQvR7r0ZBGXOAI+x8/6otBqFB/8nb10Yhl2Qzw+ZlO/Au1kIrhLYrev1Z4xa9ZzgdIbGeLB2QHjbEnaXPekIE/qwTkEL4qssP7YGFG7uVhhE= From 61aeab186506f14c831e36ff2a9be101108a9b10 Mon Sep 17 00:00:00 2001 From: elandau Date: Fri, 16 Nov 2018 13:12:05 -0800 Subject: [PATCH 4/5] ignore javadoc lint errors --- build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 15e60a933..f819ff9bb 100644 --- a/build.gradle +++ b/build.gradle @@ -34,10 +34,12 @@ subprojects { sourceCompatibility = 1.6 targetCompatibility = 1.6 - - group = "com.netflix.${githubProjectName}" + tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') + } + eclipse { classpath { // include 'provided' dependencies on the classpath From 98dc4a7cf34d2f8dabdc4a0148adbc7615bede78 Mon Sep 17 00:00:00 2001 From: elandau Date: Fri, 16 Nov 2018 13:26:36 -0800 Subject: [PATCH 5/5] disable javadocs lint --- build.gradle | 8 ++++---- hystrix-core/build.gradle | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index f819ff9bb..a207aaeae 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,10 @@ allprojects { } apply plugin: 'net.saliman.cobertura' + + tasks.withType(Javadoc) { + options.addBooleanOption('Xdoclint:none', true) + } } subprojects { @@ -36,10 +40,6 @@ subprojects { group = "com.netflix.${githubProjectName}" - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - eclipse { classpath { // include 'provided' dependencies on the classpath diff --git a/hystrix-core/build.gradle b/hystrix-core/build.gradle index 8955c78e9..683cf91d7 100644 --- a/hystrix-core/build.gradle +++ b/hystrix-core/build.gradle @@ -23,6 +23,8 @@ javadoc { windowTitle = "Hystrix Javadoc ${project.version}" } options.addStringOption('top').value = '

Hystrix: Latency and Fault Tolerance for Distributed Systems

' + + enabled = false } jar {