.drone.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. services:
  2. mysql:
  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. HOST_RADIUS: radius.fd3.flowdat.com
  19. HOST_CABLEMODEM: cablemodem.fd3.flowdat.com
  20. HOST_DHCP: dhcp.fd3.flowdat.com
  21. HOST_GEOSERVER: geoserver.fd3.flowdat.com
  22. HOST_DHCP: dhcp.fd3.flowdat.com
  23. HOST_GEOSERVER: geoserver.fd3.flowdat.com
  24. OAUTH_CLIENT_ID: ""
  25. OAUTH_CLIENT_SECRET: ""
  26. AMQP_KEY: ""
  27. CLIENT: fd3
  28. MYSQL_ROOT_PASSWORD: ""
  29. DOMAIN: flowdat.com
  30. MODULES_INSTALL: "base,ftth,etc"
  31. commands:
  32. - command -v mysqladmin >/dev/null 2>&1 || { echo "I require mysqladmin but it's not installed. Aborting." >&2; exit 1; }
  33. - while ! mysqladmin ping -h mysql --silent; do :; done
  34. - yes | mysqladmin -h mysql create fd3_stats
  35. - yes | mysqladmin -h mysql create fd_session
  36. - echo 'client = Flowdat3-Stats-Drone-Test' | tee /etc/flowdat.conf
  37. - echo 'date.timezone="America/Argentina/Buenos_Aires"' >> /etc/php/7.0/cli/php.ini
  38. - chmod 0400 keys/bitbucket.id_rsa
  39. - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
  40. - composer install --no-interaction --no-progress
  41. - chmod 0777 -R var/logs var/cache var/sessions
  42. - php bin/console doctrine:schema:update --force -vvv --env=test
  43. - vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
  44. docker:
  45. repo : docker.infra.flowdat.com/fd3/stats
  46. image: plugins/docker
  47. email: luciano@interlink.com.ar
  48. registry: docker.infra.flowdat.com
  49. tag:
  50. - "latest"
  51. when:
  52. event: [push]
  53. branch: [master]
  54. docker_tag:
  55. repo : docker.infra.flowdat.com/fd3/stats
  56. image: plugins/docker
  57. email: luciano@interlink.com.ar
  58. registry: docker.infra.flowdat.com
  59. tag:
  60. - "${DRONE_TAG##v}"
  61. when:
  62. event: [tag]
  63. branch: [v*]