deploy:
- provider: s3
  access_key_id: $TRAVIS_AWS_ACCESS_KEY
  secret_access_key: $TRAVIS_AWS_SECRET_KEY
  local_dir: upload
  skip_cleanup: true
  on:
    branch: master
  bucket: deploy.vabusinesses.org
  region: us-east-1
- provider: codedeploy
  access_key_id: $TRAVIS_AWS_ACCESS_KEY
  secret_access_key: $TRAVIS_AWS_SECRET_KEY
  bucket: deploy.vabusinesses.org
  key: latest.zip
  bundle_type: zip
  application: VA-Businesses
  deployment_group: VA-Businesses
  region: us-east-1
  on:
    branch: master
  wait-until-deployed: true
  

dist: xenial
language: php
php:
- '7.0'
addons:
  sonarcloud:
    organization: "openva"
script:
- sonar-scanner
  && zip -qr latest *
  && mkdir -p upload
  && mv latest.zip upload/latest.zip
deploy:
- provider: s3
  access_key_id: $TRAVIS_AWS_ACCESS_KEY
  secret_access_key: $TRAVIS_AWS_SECRET_KEY
  local_dir: upload
  skip_cleanup: true
  on:
    branch: master
  bucket: deploy.vabusinesses.org
  region: us-east-1
- provider: codedeploy
  access_key_id: $TRAVIS_AWS_ACCESS_KEY
  secret_access_key: $TRAVIS_AWS_SECRET_KEY
  bucket: deploy.vabusinesses.org
  key: latest.zip
  bundle_type: zip
  application: VA-Businesses
  deployment_group: VA-Businesses
  region: us-east-1
  on:
    branch: master
  wait-until-deployed: true
  

Add Travis header matter, configure Sonar and ZIP creation
Add Travis header matter, configure Sonar and ZIP creation