sudo: required
language: ruby
cache: bundler
rvm:
- 2.5.1
jobs:
  include:
  - stage: test
    name: rubocop
    script: bundle exec rubocop
    if: env(CD_TEST_IGNORE) IS NOT present
  - stage: test
    name: rspec
    script: gem install bundler & bundle exec rspec
    if: env(CD_TEST_IGNORE) IS NOT present
  - stage: build
    name: build docker image
    script: bash scripts/image_build.sh $TRAVIS_REPO_SLUG $TRAVIS_BRANCH
    if: env(CD_BUILD_IGNORE) IS NOT present AND type NOT IN (pull_request) AND env(CD_DOCKER_USERNAME)
      IS present AND env(CD_DOCKER_PASSWORD) IS present
notifications:
  email: false
  slack:
    secure: T64A1ut/3LdnUpPfsywNkjbyR2AIRlm99SM40xnLmXjM6Q0EtcFJ4luymC0EQB2q86WmFiK3AyPNm/EKGw8ZmjgeJIUkhMm8zZOLnYLsqMZeYmNNlDtV4zbhQ0HO3uvBqGVCSD2LTcGhCU/9VAplWpa9VnWUsWeRfklQ1yJ4y9oKtzEuiFHrILbDfqF47SlkQqbhS/Bl/oGHVVXijAmomJGG4wa9UI0PlSOUL2sJxxMhti+fptSwKo+TgKS8Vtjeu3C10QfRlcSmoDS0vaQgm7fggm/GrQ8zkSC/SKzOes/+hhRBE+TERWkx26azEy2kmI6xIkNf2BqFjDtQkjKN9yJLdJ1Kyry0uk7Eco67klEN/WoJ38NBuHVkq7p2CWWawFMg3OCS/3D9DStvYJBTBFrv7LMGKfhB4UdOgr/aSRlCTiF2grxqaXmDp0p/1J3uHIfDxbXiwx2ySjJFSC9e0/nTkJprPCQxVoZO+OFk0y2ElHMrX5L0qA2kZ4tQaPf04pQNguCgEsTnBtivVVMxCn9+ymgcHAnzGZmQmQ52NoZBQpa2FjBfhfxGOqHWJm6Kuk3p5yrGZTqlkf3GlTIlFNL8y9/5w6QaxQJbZLYSBbxAtJNvMWN/1cUwdbRTE4D0QTThASTgN6TtPKfWwIRrfj5+G9cAWo6DunmNhzATZ9g=
