| language: java |
| |
| notifications: |
| email: |
| recepients: |
| - omid-ci@yahoo-inc.com |
| on_success: always |
| on_failure: always |
| |
| jdk: |
| - oraclejdk8 |
| |
| branches: |
| only: |
| - master |
| |
| cache: |
| directories: |
| - "~/.m2" |
| |
| before_script: |
| # This is required to avoid failures of HBase minicluster related to Hadoop 1.x releases |
| - umask 022 |
| - git config --global user.email "omid-ci@yahoo-inc.com" |
| - git config --global user.name "Omid CI" |
| - git checkout master |
| |
| script: |
| - if [ "${TRAVIS_PULL_REQUEST}" = "false" ] ; then |
| mvn cobertura:cobertura |
| && |
| mkdir failedTests |
| && |
| find -name testng-failed.xml -exec cp -vf "{}" failedTests/ \; |
| && |
| [ ! -f failedTests/testng-failed.xml ] ; |
| else |
| mvn test ; |
| fi |
| |
| after_success: |
| - if [ "${TRAVIS_PULL_REQUEST}" = "false" ] ; then |
| mvn coveralls:report |
| && |
| mvn -B clean release:prepare release:perform -Prelease_profile,hbase-0 --settings bintray-settings.xml ; |
| fi |
| |
| after_failure: |
| - VERSION_SUFFIX=`date +%s` |
| VERSION=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[' | grep SNAPSHOT` |
| && |
| git checkout -b "failed-build-$VERSION" |
| && |
| git config core.autocrlf false |
| && |
| git add -f */surefire-reports/* |
| && |
| git commit --verbose -m"Surefile output" |
| && |
| git push -f "https://${GH_TOKEN}@github.com/yahoo/omid.git" failed-build-$VERSION:failed-build-$VERSION-$TRAVIS_PULL_REQUEST-$VERSION_SUFFIX |