language: java
jdk:
  - oraclejdk8
notification:
  email:
    recipients:
      - song_s@ctrip.com,zhanglea@ctrip.com
    on_success: always
    on_failure: always

before_script:
  - echo "MAVEN_OPTS='-Xms1024m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m'" > ~/.mavenrc
  
before_install:
  - pip install --user codecov

after_success:
  - mvn clean test jacoco:report coveralls:report
  - codecov

branches:
  only:
    - master
    
env:
  global:
    - secure: "DYJkJ7ArGJuIyTJsmjvUAJRyUKXEaGFWYZFAGZq6vxbrMN3tThz7drfNhhvP2YE7hdS7YX7hZBWVQEnNR+pBN+ykQFx7TpLr311eEk2/Yy3G5qegeHMsgqYXfAp3FFpYlE6Kr3Dcf4kFSWtRi735kSo5oHicoaxbyWENgmKT+uQjYERKhDXEoenMaDpcf8WO8KARzxI1cXf69ECnYP2rzNOfkNW4IGjTcJnplXPZ9BNBRn3WfyPwEHlemETAMwJxJXolNM9qn1bDBTB/35yJrneQY/pYp9Q8PbQID2lNJu7PFKYaI9mvsKHUgxjbzsC29zlMY94pDr6sQtr7IA0dSuk+qO2tEqAStTwRI5JOcozLAslTMNnUn6HLvy0/Kkq1TL+JrIohoRD58F34SzjcnuB4w0/GCWGU4BMSbzPwHsgQZM4lkHDWv+w1OSwP3dgCFI/vYYr9xNV0zqTgyZ9ITkMZPL0wOh0DZ7Bxxm80wyHfJuRwywemMtzitgjPR4BKENbpcoGN4lcKWciksAuiyX+dedOPfGoOWfnIKh1g7yeVB84LMggCSad/9cqnYf2Sm8xSyVzNmyhSOy2Ocy40RDas2uHIK3/QPy56Le/t1LD2On/x1TZBIoSavedNYA5N54s/ZCDZOcepUMvlwtjgnx/SMjU85ZLKCcliPGdTWws="
    - "MAVEN_OPTS=-Xms1024m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m"

addons:
  coverity_scan:
    project:
      name: "ctripcorp/apollo"
      description: "Build submitted via Travis CI"
    notification_email: song_s@ctrip.com,zhanglea@ctrip.com
    build_command_prepend: "mvn clean"
    build_command: "mvn -DskipTests=true compile"
    branch_pattern: master

cache:
  directories:
    - $HOME/.m2
