| language: |
| - java |
| - scala |
| sudo: false |
| before_script: |
| - rm -rf $HOME/.m2 |
| - rm -rf $HOME/.ivy2 |
| - mkdir -p $HOME/.sbt/launchers/0.13.11/ |
| - curl -L -o $HOME/.sbt/launchers/0.13.11/sbt-launch.jar http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.11/sbt-launch.jar |
| script: |
| - echo "TRAVIS_PULL_REQUEST" $TRAVIS_PULL_REQUEST |
| - echo "TRAVIS_BRANCH" $TRAVIS_BRANCH |
| - echo "TRAVIS_TAG" $TRAVIS_TAG |
| - echo "repo" $TRAVIS_REPO_SLUG |
| - set -o pipefail; skipLogs="Resolving |Compiling |Done updating|Updating |scoverage|coverage-report"; |
| if [[ $TRAVIS_PULL_REQUEST != "false" || $TRAVIS_REPO_SLUG != "apache/incubator-gearpump" ]]; |
| then sbt -jvm-opts project/travis/jvmopts clean +assembly scalastyle test:scalastyle it:scalastyle unidoc coverage +test | grep -v -E "$skipLogs"; |
| elif [[ $TRAVIS_BRANCH == "master" ]]; |
| then sbt -jvm-opts project/travis/jvmopts clean +assembly +publish | grep -v -E "$skipLogs"; sbt -jvm-opts project/travis/jvmopts scalastyle test:scalastyle it:scalastyle unidoc coverage +test | grep -v -E "$skipLogs"; |
| elif [[ $TRAVIS_TAG != "" ]]; |
| then sbt -jvm-opts project/travis/jvmopts clean +assembly +packArchiveZip | grep -v -E "$skipLogs"; |
| fi |
| jdk: |
| - oraclejdk8 |
| addons: |
| apt: |
| packages: |
| - oracle-java8-installer |
| scala: |
| - 2.11.8 |
| cache: |
| directories: |
| - $HOME/.m2 |
| - $HOME/.ivy2 |
| git: |
| depth: 1 |
| after_success: |
| - if [[ $TRAVIS_PULL_REQUEST != "false" || $TRAVIS_REPO_SLUG != "apache/incubator-gearpump" || $TRAVIS_BRANCH == "master" ]]; |
| then bash <(curl -s https://codecov.io/bash); |
| elif [[ $TRAVIS_TAG != "" ]]; |
| then set -o pipefail; openssl aes-256-cbc -K $encrypted_3d8d53d5fdbf_key -iv $encrypted_3d8d53d5fdbf_iv -in secring.asc.enc -out secring.asc -d; sbt +publishSigned sonatypeReleaseAll | grep -v -E "Resolving "; |
| fi |
| deploy: |
| provider: releases |
| skip_cleanup: true |
| api_key: |
| secure: NYY003Bum6aL5h5Au8nCEY51lnDcsCErvmfzpIh0CWNY4UKnADSXkJPdureAf3OR7eMFmQxMi1rL2MQtOjlCWgaPO4TmEJrXB3vMZTTyj1COst5WIQV8S/BbgDzKFEP9zuRNbMXdRJqf0rEhIrKPagXkOTDaGNijmjCCh5y62M4= |
| file_glob: true |
| file: output/target/gearpump-*.zip |
| on: |
| repo: apache/incubator-gearpump |
| tags: true |
| all_branches: true |
| install: |
| - mkdir travis-phantomjs |
| - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O "$PWD"/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 |
| - tar -xvf "$PWD"/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C "$PWD"/travis-phantomjs |
| - export PATH="$PWD/travis-phantomjs:$PATH" |