language: java
dist: trusty
jdk:
  - oraclejdk8

before_install:
  - if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --no-tty --no-use-agent --import; fi
  - if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
  - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-

install: true
script:
  - mvn clean verify --settings .travis/settings.xml

after_success:
  - mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=hevelian-olastic -Dsonar.login=${SONAR_TOKEN}
  - bash <(curl -s https://codecov.io/bash)

deploy:
  -
    provider: script
    script: bash .travis/deploy.sh
    skip_cleanup: true
    on:
      repo: Hevelian/hevelian-olastic
      jdk: oraclejdk8

cache:
  directories:
    - '$HOME/.m2/repository'
    - '$HOME/.sonar/cache'
language: java
dist: trusty
jdk:
  - oraclejdk8

before_install:
  - if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --no-tty --no-use-agent --import; fi
  - if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
  - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-

install: true
script:
  - mvn clean verify --settings .travis/settings.xml

after_success:
  - mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=hevelian-olastic -Dsonar.login=${SONAR_TOKEN}
  - bash <(curl -s https://codecov.io/bash)

deploy:
  -
    provider: script
    script: bash .travis/deploy.sh
    skip_cleanup: true
    on:
      repo: Hevelian/hevelian-olastic
      all_branches: true
      jdk: oraclejdk8

cache:
  directories:
    - '$HOME/.m2/repository'
    - '$HOME/.sonar/cache'
Use all branches for deploy
Use all branches for deploy
