.drone.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. services:
  2. database:
  3. image: mysql:5.7
  4. command: '--sql_mode=ALLOW_INVALID_DATES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
  5. environment:
  6. - MYSQL_ROOT_PASSWORD=
  7. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  8. amqp:
  9. image: rabbitmq:3-management
  10. pipeline:
  11. build:
  12. image: docker.infra.flowdat.com/fd3/sf-php:latest
  13. commands:
  14. - command -v mysqladmin >/dev/null 2>&1 || { echo "I require mysqladmin but it's not installed. Aborting." >&2; exit 1; }
  15. - while ! mysqladmin ping -h 127.0.0.1 --silent; do :; done
  16. - echo 'Acquire::http { Proxy "http://200.50.168.30:3142"; };' > /etc/apt/apt.conf.d/01proxy
  17. - yes | mysqladmin -h 127.0.0.1 create fd3_stats
  18. - yes | mysqladmin -h 127.0.0.1 create fd_session
  19. - echo 'client = Flowdat3-Stats-Drone-Test' | tee /etc/flowdat.conf
  20. - chmod 0400 keys/bitbucket.id_rsa
  21. - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
  22. - composer install --no-interaction --no-progress
  23. - chmod 0777 -R var/logs var/cache var/sessions
  24. - php bin/console doctrine:schema:update --force -vvv --env=test
  25. - vendor/phpunit/phpunit/phpunit --tap
  26. docker:
  27. repo : docker.infra.flowdat.com/fd3/stats
  28. image: plugins/docker
  29. email: luciano@interlink.com.ar
  30. registry: docker.infra.flowdat.com
  31. username: drone
  32. password: 6hd2dLfL
  33. tag:
  34. - ${DRONE_TAG##v}
  35. - latest
  36. when:
  37. event: [pull_request, push, tag]
  38. branch: [master, v*]