.drone.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. environment:
  14. HOST_FTTH: ftth.test.fd3.flowdat.com
  15. HOST_STATS: stats.test.fd3.flowdat.com
  16. HOST_MAPAS: mapas.test.fd3.flowdat.com
  17. HOST_BASE: base.test.fd3.flowdat.com
  18. OAUTH_CLIENT_ID: ""
  19. OAUTH_CLIENT_SECRET: ""
  20. AMQP_KEY: ""
  21. commands:
  22. - command -v mysqladmin >/dev/null 2>&1 || { echo "I require mysqladmin but it's not installed. Aborting." >&2; exit 1; }
  23. - while ! mysqladmin ping -h 127.0.0.1 --silent; do :; done
  24. - echo 'Acquire::http { Proxy "http://200.50.168.30:3142"; };' > /etc/apt/apt.conf.d/01proxy
  25. - yes | mysqladmin -h 127.0.0.1 create fd3_stats
  26. - yes | mysqladmin -h 127.0.0.1 create fd_session
  27. - echo 'client = Flowdat3-Stats-Drone-Test' | tee /etc/flowdat.conf
  28. - echo 'date.timezone="America/Argentina/Buenos_Aires"' >> /etc/php/7.0/cli/php.ini
  29. - chmod 0400 keys/bitbucket.id_rsa
  30. - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
  31. - composer install --no-interaction --no-progress
  32. - chmod 0777 -R var/logs var/cache var/sessions
  33. - php bin/console doctrine:schema:update --force -vvv --env=test
  34. - vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
  35. docker:
  36. repo : docker.infra.flowdat.com/fd3/stats
  37. image: plugins/docker
  38. email: luciano@interlink.com.ar
  39. registry: docker.infra.flowdat.com
  40. username: drone
  41. password: 6hd2dLfL
  42. tag:
  43. - latest
  44. when:
  45. event: [pull_request, push, tag]
  46. branch: [master]
  47. tag_docker:
  48. repo : docker.infra.flowdat.com/fd3/stats
  49. image: plugins/docker
  50. email: luciano@interlink.com.ar
  51. registry: docker.infra.flowdat.com
  52. username: drone
  53. password: 6hd2dLfL
  54. tag:
  55. - ${DRONE_TAG##v}
  56. when:
  57. event: [pull_request, push, tag]
  58. branch: [v*]