From 1e6dcf308f5d010907b76916f12977639a39d6f3 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sat, 2 Jul 2016 12:10:00 +0800 Subject: [PATCH] Revert "Adds travis configuration to publish openfeign (#417)" This reverts commit 9fd832cfca3a93a35483ba65991937ff5b71b5cb. --- .travis.yml | 67 ++++++++------------------ travis/publish.sh | 119 ---------------------------------------------- 2 files changed, 19 insertions(+), 167 deletions(-) delete mode 100755 travis/publish.sh diff --git a/.travis.yml b/.travis.yml index 95cf153d..7e9d20bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,53 +1,24 @@ -# Run `travis lint` when changing this file to avoid breaking the build. -# Default JDK is really old: 1.8.0_31; Trusty's is less old: 1.8.0_51 -# https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments -sudo: required -dist: trusty - +language: java +sudo: false +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/110a7c0daf817ba48ccc + on_success: change + on_failure: always + on_start: false +jdk: +- oraclejdk8 +install: true +script: ./buildViaTravis.sh cache: directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ - $HOME/.m2 - -language: java - -jdk: - - oraclejdk8 - - -before_install: - # Parameters used during release - - git config user.name "$GH_USER" - - git config user.email "$GH_USER_EMAIL" - # setup https authentication credentials, used by ./mvnw release:prepare - - git config credential.helper "store --file=.git/credentials" - - echo "https://$GH_TOKEN:@github.com" > .git/credentials - -install: - # Override default travis to use the maven wrapper - - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V - -script: - - ./travis/publish.sh - -# Don't build release tags. This avoids publish conflicts because the version commit exists both on master and the release tag. -# See https://github.com/travis-ci/travis-ci/issues/1532 -branches: - except: - - /^[0-9]/ - env: global: - # Ex. travis encrypt BINTRAY_USER=your_github_account - - secure: "NGcSeLi/laUTG3mj65smONVX7O5Ocmc6/etXNazjoeU/BkHXZyTbjfAooAkTF85yS4x+3N6zU03XKlCbGR5kOP0bxcbApU8htocuQRJnZcLzbuEHhlG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g5SLC+Od16VmNWbOXcBSJUefkL/2stdMdnnquahW6o6GNYn8WBF4GiUwxEElHR8E6cX5WqRTKn7O5OR/FqXlcSwvCnsrCe6HoqO9qbYMp6YNFUJNpjhQqSdUBo8UMySBYsVljVmUFnidV4tuJDVNTmgS97bu9OM0tZ21YkuELtMMDpF0D4IbHsKWw+ipL+bSF9BSX0mMJ8PocQiKV9oQeVL1J2Z5GVWuNG7k/Aj4s=" - # Ex. travis encrypt GH_USER_EMAIL=for_github@domain.com --add - - secure: "qHTxYw9FzZgkFaXWiuq/BN5fvNaY59IYQSciu6AMJEsn15YdL+rB5KPfWY5pNcLgTqBGkVFHTPYt7V5P3s1tfNo6Vtlo5bdi3IgAyjmPH4CJ2YYiY3zVhDwWCzSPaau12Ir3bWZM9qHTd+GHHAS+gu0YJpxoMVtjrF2V3sVovqzot47KlHlobxKcS6yPH9931Asw1BS55pcKRgyXWyaY/WDFM5W0e/K98E8y8t7HK2tEn1FXFs0+cwhiP0u1IOHSGceiCl9fa8GVxRHn+UzGrht/WgwEDV81Glg1DAzrPEGuieRaPpiWg+wYDCGa/tlbHtfkIT7bfuCQ0byJPrAPPT2wugbI9pFcAISgv98D7AYaG59xY3WgBmNyIpDfNAyirJV47PRpvEfYp8kAJ59Y+LkoheUJf64jbp3Mux6WuI3TtrAL2AKUMU4gtyGKGY7jqFETrd1LrgGspTE6hwz/ECzHSo7EBUuS/5LtM8rQh0iZQby8HOybubdJmGNaPeltxHA70Nz2XgtJWsQl9IzJCq6EXSTgxgWcDqdscUCphaClEkjP3B5CwMSR8re0d0VJQ9ues4ybZZZITJpCkkpG9i19bSjSBxe+bBcmWjl6pPjvVA3Cx8wDVACs0IC1qgmBMuxKO9RwVv4sOTTEOSMfDao8/pJg2Ih1zwknkm2qsy8=" - # Ex. travis encrypt GH_USER=your_github_account --add - - secure: "P7PnHWFjRRpdIc6FiRH3IlVjULWX+BdHRIyU/ATqM4QDpxhobtipy71mm8sW3dKZptnQBMnpkd2lnpXRMzwDzz2awjKdX5oqs1DP3KRLyOw6VILmJlRlS7U38PmMPZg/L1vWIE5+UZJsFUn/jn4oVwuXeKHwMjtLrF3Dcfzg04OPOFw4KY367OfMNqkWRx+ciUOzQUNqUWiNVZ0iAXYi92Ji5Gp8nes5PfPEtTGFeyNkVsurUTGlRqCEXxeSFEqcm5hHuyM6vH9tq0yNDTI3fIx/DqTn6GfBGIQKZ20+Fw0ZCtsyezgYnPLONBJFTIwveh8ocsxU4sWwqRcLY2un8Yy/B274Crnn05cr8+xanxmczErTCsJqyVMxWiWruborm65DEAvNZisdCgcA88R8uqUtQTF7jS0MMdaCh57kCv3dw1No4hh5OJ9XkJgEwC0x0+vFzGGgzdg/LPh32H5SODEc1w3JXBLEaSf15NVwMAtiCcGwHHMfejQ0s3k0A3LB8ZJi/kyajc3fOcSu6VVRehCTuT3YPMT1kilJ4PrkVKut4pgxgJ5pvpdOR0vqg+nTcDxb4qfkjRKJ9iMYZQpzwX1PF9d0Hj2VbBvQKMdpl0+6fCqMLS8bt3K7/4RC5ygkhnHuHTJX3jOgrVPX1ZYcLDeqaemFUOrk+XxbpU34X+Q=" - # Ex. travis encrypt GH_TOKEN=XXX-https://github.com/settings/tokens-XXX --add - - secure: "l9sTLGBGi+TbNYKODdnPvtVEExtwFehAGNMvN54+sPFjonoPFVrOipsDt+xjYDukLfO4FElZTDEcddx/J9i/HTFqpSxbnisxq75dJ9FK2whmKAxMMGVC0PyUS8QZKBPH94jPgZRrYJnSPacWN6NoGao92ygD+Rzv5k6JtB3umKn+w+uwH1OemaUdREr0lvC16KKNk1b50tdkvgWfc3xjrGJbwA57Kd+j3fz/UzCugoEHr8uPQcwexzE5iUdBLYjqrRbstNUkB6+qscEsEOsF2J4c/TQjimEbGLYS2iI04Tei2LWsR59p+KnL24NnBsEf9fYrwAyx6X9g0VtFl9AzxNsGt3pps7aU4pvydkn34s9XLx3qctPSpplYQZsdbrZ80aPiUy7LEgINLxPMThjKlt+/maCKDD3aks5mp8moMxDer5+7pdBs7+rZGNA9VegffRpSieIg9UH+R+ro46ogzEti352n8caFaJA3lyrJcEd4axwb64Vm0YTSokQnxRb3PQzL5CZHYH0ju9RN+Qjv5OLoVgQR5H+oO6IPlhFFVKorfFSGq/IGPeDp5R70ojHF6z31GqOb4V6X4QL1FClX2TfpjCmmnJjq4I5vMrmUD+lc9bCEZWXsInGsSVUeq3cJjiDo6fKCMBdNU2S9CJQl1vUwOnf7aRkNPBuB0RKdLFs=" - # Ex. travis encrypt SONATYPE_USER=your_sonatype_account - - secure: "EgPhuaw2T8LOU/ibgM1SorwWYTRhUhGpbkbWtUMbNd6cSJnuc6s/DLH9p6J4MFXOkEsSj1s7BHSJBWKhuGYeq7EjKcLTMqa6T16HdwEZPqDzhKhLqs3bf78R3ep+SW1fn7JbcAhsJyHkHCJ8bnr69QfCJUB5J5bKruWlyxCqiovVwx8LmGqRUfkssqYPQq4RVQspOqNZPyqFdqmAncNBHgG65eGruXYTwGWApc4xFLCPIzDCGEHkOLY2grQZZHAWrCUayN6hir2+GDmWxuMYAXV8O9brcvU6gXN+/wWvl+/OzNSuSgrMr+vvPSoCQurDKkmvUTbMZqKDnZNiOOOJoa1+WHY3Pm2NsDhjMxR/W813nAm1XI1/1n683xZDIRk3GnRyYDF1jxVrvZEUNKAezj1XktTPYRIHtaKA1PiWdAVSZKBCZMzFluHMX3i7F++lLKy/7xN4RFljFwphJgsQog8mmGMupWqiXp3zAB+fq9PX8W/L2pJf1KlgLaP/tEESc8O+7PbR5OezfD246YEMByr/jhXRK/8V7feJah5cnmfOIUiwxRSSpcy393cH4rn1vmzlVVR5cxPmqFsUlmxgMKo6N369WR6lWVCEGmL5hAP+xfOyoMTLKQDBGX+7FbJRyLQWpK0OgqzlTb8ipPJFjO+kG6roLDtmS2wd+8UGDDU=" - # Ex. travis encrypt SONATYPE_PASSWORD=your_sonatype_password - - secure: "AU0Jd9hJIr91EGm1ca2RmGWiGSzpV/ER+1RXdfhrPH1i2DP9RaHtby7qYpdHZg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TcBR7u8ZvNzY7I4RXdxTRt54eiyNT4EsqG7vLIECBoKE2CJf1XYv8PO+2Cxsd7D5STzpgtKM3z59h+J0wPmHw= + - secure: VFv9NqL3mGQnIjLRZkTmMlnNCtWu2co8V54oQYSTgYT3HmR6ootn/vd6YL4p48abHlBbS3chGefrfaoY5SkOD6oewwNimOPBn+u2uIsBKfL3E6ROrO6Enf0YdIPHBmhXT8Lasmc0ZMqkGx32n0JwCou6Md8c04i/wCp62QsKXbk= diff --git a/travis/publish.sh b/travis/publish.sh deleted file mode 100755 index 8b2f6074..00000000 --- a/travis/publish.sh +++ /dev/null @@ -1,119 +0,0 @@ -# taken from OpenZipkin - -set -euo pipefail -set -x - -build_started_by_tag() { - if [ "${TRAVIS_TAG}" == "" ]; then - echo "[Publishing] This build was not started by a tag, publishing snapshot" - return 1 - else - echo "[Publishing] This build was started by the tag ${TRAVIS_TAG}, publishing release" - return 0 - fi -} - -is_pull_request() { - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then - echo "[Not Publishing] This is a Pull Request" - return 0 - else - echo "[Publishing] This is not a Pull Request" - return 1 - fi -} - -is_travis_branch_master() { - if [ "${TRAVIS_BRANCH}" = master ]; then - echo "[Publishing] Travis branch is master" - return 0 - else - echo "[Not Publishing] Travis branch is not master" - return 1 - fi -} - -check_travis_branch_equals_travis_tag() { - #Weird comparison comparing branch to tag because when you 'git push --tags' - #the branch somehow becomes the tag value - #github issue: https://github.com/travis-ci/travis-ci/issues/1675 - if [ "${TRAVIS_BRANCH}" != "${TRAVIS_TAG}" ]; then - echo "Travis branch does not equal Travis tag, which it should, bailing out." - echo " github issue: https://github.com/travis-ci/travis-ci/issues/1675" - exit 1 - else - echo "[Publishing] Branch (${TRAVIS_BRANCH}) same as Tag (${TRAVIS_TAG})" - fi -} - -check_release_tag() { - tag="${TRAVIS_TAG}" - if [[ "$tag" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then - echo "Build started by version tag $tag. During the release process tags like this" - echo "are created by the 'release' Maven plugin. Nothing to do here." - exit 0 - elif [[ ! "$tag" =~ ^release-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then - echo "You must specify a tag of the format 'release-0.0.0' to release this project." - echo "The provided tag ${tag} doesn't match that. Aborting." - exit 1 - fi -} - -is_release_commit() { - project_version=$(./mvnw help:evaluate -N -Dexpression=project.version|grep -v '\[') - if [[ "$project_version" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then - echo "Build started by release commit $project_version. Will synchronize to maven central." - return 0 - else - return 1 - fi -} - -release_version() { - echo "${TRAVIS_TAG}" | sed 's/^release-//' -} - -safe_checkout_master() { - # We need to be on a branch for release:perform to be able to create commits, and we want that branch to be master. - # But we also want to make sure that we build and release exactly the tagged version, so we verify that the remote - # master is where our tag is. - git checkout -B master - git fetch origin master:origin/master - commit_local_master="$(git show --pretty='format:%H' master)" - commit_remote_master="$(git show --pretty='format:%H' origin/master)" - if [ "$commit_local_master" != "$commit_remote_master" ]; then - echo "Master on remote 'origin' has commits since the version under release, aborting" - exit 1 - fi -} - -#---------------------- -# MAIN -#---------------------- - -if ! is_pull_request && build_started_by_tag; then - check_travis_branch_equals_travis_tag - check_release_tag -fi - -./mvnw install -nsu - -# If we are on a pull request, our only job is to run tests, which happened above via ./mvnw install -if is_pull_request; then - true -# If we are on master, we will deploy the latest snapshot or release version -# - If a release commit fails to deploy for a transient reason, delete the broken version from bintray and click rebuild -elif is_travis_branch_master; then - ./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DskipTests deploy - - # If the deployment succeeded, sync it to Maven Central. Note: this needs to be done once per project, not module, hence -N - if is_release_commit; then - ./mvnw --batch-mode -s ./.settings.xml -nsu -N io.zipkin.centralsync-maven-plugin:centralsync-maven-plugin:sync - fi - -# If we are on a release tag, the following will update any version references and push a version tag for deployment. -elif build_started_by_tag; then - safe_checkout_master - ./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DreleaseVersion="$(release_version)" -Darguments="-DskipTests" release:prepare -fi -