# .travis.yml
# Configure Travis CI service for http://github.com/PDAL
# NOTE: The | below in 'after_success' enables YAML block mode so that we
# can maintain newlines and write reasonable shell script.

sudo: required

services: docker

before_install:
  - docker pull pdal/alpinebase:latest

script:
  - docker run -v $TRAVIS_BUILD_DIR:/pdal -t pdal/alpinebase:latest /pdal/scripts/ci/script.sh

after_success: |
  if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" &&
        "$TRAVIS_BRANCH" == "2.2-maintenance" &&
        -n "$encrypted_6a5172b96922_key" ]]
  then
      cd scripts/ci
      ./after_success.sh $TRAVIS_BUILD_DIR $encrypted_6a5172b96922_key \
            $encrypted_6a5172b96922_iv
  fi

notifications:
  on_success: always
  on_failure: always
  irc: chat.freenode.net#pdal
  slack:
    rooms:
      secure: AjatYRAUpsczjENkpHPFiLLZ/leDlzx4TH+oPQYZCpA4WpJdNRy0IB4oMR2IYiY+qz0nHDbeMTBvF0l8S6NknZAz20f8buf4IkrdXymBQBOTmLHMWbpgHuSCCu7xMwtG6thjMEmBOXm5UgCcdqvlchcaoAUunyprXQWgJwI+tHE=
    on_failure: always
    on_success: change
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/4c7f3edec32936d6a758
